• Welcome to Battlezone Universe.
 

News:

Welcome to the BZU Archive dated December 24, 2009. Topics and posts are in read-only mode. Those with accounts will be able to login and browse anything the account had access granted to at the time. No changes to permissions will be made to be given access to particular content. If you have any questions, please reach out to squirrelof09/Rapazzini.

Main Menu

Search something to modify Units/scrapcost etc

Started by Shephren, March 19, 2009, 09:22:59 PM

Previous topic - Next topic

Nielk1

#45
See, here, I would use:

[GameObjectClass]
classLabel = "ibfact" // inherit all default values from ibfact.odf
scrapCost = 0
scrapValue = 10
maxHealth = 6000

//requireCount = 1 // no need for this if inheriting it
//requireName1 = "ibpgen_cheap" // do note that ibpgen_cheap.odf SHOULD provide ibpgen, and as such, you do not need to edit, or if inheriting even include this line.
//requireText1 = "Build Power"

//provideCount = 1 // Interesting tidbit, if you inherit this as 1, you can change it to 2 and only provide a 2nd provide below, loading in the first from the inherited ODF.
//provideName1 = "ibfact" // inherited

[PoweredBuildingClass]

[BuildingClass]

[FactoryClass]
buildItem1 = "ivmbike_cheap"
buildItem2 = "ivmisl_cheap"
buildItem3 = "ivtank_cheap"
buildItem4 = "ivrckt_cheap"
buildItem5 = "ivatank_cheap"
buildItem6 = "ivwalk_cheap"
buildItem7 = "ivapc_cheap"
buildItem8 = "ivbomb_cheap"

[Lod1]


As I have said SEVERAL times, this is called INHERITANCE. You can INHERIT from an existing ODF. Basically, what occurs with class label is you type in the archetype. The thing your object is and thus get all its defaults. 1.3pb3 and up allow you to specify an existing ODF as your archetype, thus loading all its defaults and giving you a ton less work. THAT IS WHY I am telling you to put "ivrecy" in that slot.

You really need to try this more 1 thing at a time. So start with the rec I posted WAAAAYYYY back, and set it to deploy to "ibrecy" and see if it works. If it does, than set it to deploy as "ibrecy_cheap" and then create that ODF but have it keep stock values and test again.

1.3 should allow you to have many many missing files, and still 'run', unlike 1.2, but when you start looping the classlabels back on themselves, you have really screwed up.

EDIT:
For example, here are two ODFs from one of my MRVP recs.

ivrecyfatboy.odf
[GameObjectClass]
classLabel = "ivrecy"

[CraftClass]

[TrackedVehicleClass]

[TrackedDeployableClass]

[DeployBuildingClass]
deployName = "ibrecyfatboy"

[RecyclerVehicleClass]

[Lod1]


ibrecyfatboy.odf
[GameObjectClass]
classLabel = "ibrecy"

[PoweredBuildingClass]

[BuildingClass]

[FactoryClass]
buildItem1 = "ivsilofatboy"
buildItem8 = "ivscout_m"
buildEmptyItem = 8
buildItem9 = "ivservfatboy"

[RecyclerClass]

[Lod1]

Click on the image...

AHadley


Shephren

............................................________........................
....................................,.-'"...................``~.,..................
.............................,.-"..................................."-.,............
.........................,/...............................................":,........
.....................,?......................................................\,.....
.................../...........................................................,}....
................./......................................................,:`^`..}....
.............../...................................................,:"........./.....
..............?.....__.........................................:`.........../.....
............./__.(....."~-,_..............................,:`........../........
.........../(_...."~,_........"~,_....................,:`........_/...........
..........{.._$;_......"=,_......."-,_.......,.-~-,},.~";/....}...........
...........((.....*~_......."=-._......";,,./`..../"............../............
...,,,___.\`~,......"~.,....................`.....}............../.............
............(....`=-,,.......`........................(......;_,,-"...............
............/.`~,......`-...............................\....../\...................
.............\`~.*-,.....................................|,./.....\,__...........
,,_..........}.>-._\...................................|..............`=~-,....
.....`=~-,_\_......`\,.................................\........................
...................`=~-,,.\,...............................\.......................
................................`:,,...........................`\..............__..
.....................................`=-,...................,%`>--==``.......
........................................_\..........._,-%.......`\...............
...................................,<`.._|_,-&``................`\..............

that's all i have to say.Why?I can't understand that.I suppose i've done everything as you said,my ivrecy_cheap.odf looks like that:

[GameObjectClass]
classLabel = "ivrecy"
[CraftClass]
[trackedVehicleClass]
[trackedDeployableClass]
[DeployBuildingClass]
deployName = "ibrecy"
[RecyclerVehicleClass]
[Lod1]

,even this still won't work.I type in "ivrecy_cheap" and editor shuts down -.-

@Zero Angel:Tried out what you've suggested,but my "ivrecyfact.odf" didn't work.Looks like:

[GameObjectClass]
classLabel = "ivrecy"
[CraftClass]
[trackedVehicleClass]
[trackedDeployableClass]
[DeployBuildingClass]
deployName = "ibfact"
[RecyclerVehicleClass]
[Lod1]

Now i'm despaired.

Nielk1

#48


I'll explain it once more.
YES THERE IS MR.TWOSEDS
IT WILL WORK
IT IS CALLED INHERITANCE
IT IS A PB4+ FEATURE

Again, here is one of my MANY MANY MANY recs:
[GameObjectClass]
classLabel = "ivrecy"

[CraftClass]

[trackedVehicleClass]

[trackedDeployableClass]

[DeployBuildingClass]
deployName = "ibrecyfatboy"

[RecyclerVehicleClass]

[Lod1]



^^Post to which this was replying was removed^^

Shephren, did you at any time modify the data.pak? As in do ANYTHING to it other than extract or open files inside of it? If it isn't working, I suspect you somehow went and broke something else, like perhaps ivrecy.odf from the pak itself.

Also, what does the BATTLEZONE.LOG file say?

Click on the image...

mrtwosheds

Your right.

Silly me.

Get someone who is just starting to mod to use inheritance, it wont confuse him at all.

Nielk1

lol!

Something like what he wants to do is practically why inheritance exists. Otherwise I would not start with that.

Click on the image...

Shephren

Yeah,i think i changed something IN the data.pak.Opened with the Pak.Explorer i created a new folder,deleted it.Created another one and put in a file i had modyfied some minutes before i created the new folder.Deleted both after 20 min because you said,"put nothing in the data,save it in another folder" and finaly put it in addon.So i save them in addon all the time.
Last few entries of the LOG file are:


DIAG|GLOBAL          |                 vid:3601 |21:26:41|15844  |frame mem: total 268435456, free 256376832
DIAG|GLOBAL          |                 vid:801  |21:26:41|15844  |
DIAG|GLOBAL          |            runcodes:153  |21:26:41|15845  |[Main] Entering run code [MISSION]
DIAG|GLOBAL          |            runcodes:153  |21:26:41|15845  |[Mission] Entering run code [RUN]
DIAG|GLOBAL          |            Planners:9959 |21:26:41|15863  |SetAIP - cfg(stock13_if0.aip) team(5)

DIAG|GLOBAL          |            runcodes:153  |21:26:42|17231  |[Mission] Entering run code [EDIT]
DIAG|GLOBAL          |      MissionHandler:1432 |21:26:42|17231  |Expanded game UI file of 'bzeditor_init_1280x1024.cfg' not found. Using default of 'bzeditor_init.cfg'
ERR |GLOBAL          |             fontsys:77   |21:26:42|17244  |Font [LARGE] already exists
ERR |GLOBAL          |             fontsys:77   |21:26:42|17244  |Font [MEDIUM] already exists
ERR |GLOBAL          |             fontsys:77   |21:26:42|17244  |Font [SMALL] already exists
ERR |GLOBAL          |             fontsys:77   |21:26:42|17244  |Font [TINY] already exists
ERR |GLOBAL          |             fontsys:77   |21:26:42|17244  |Font [SYSTEM] already exists
ERR |GLOBAL          |              cursor:252  |21:26:42|17244  |Cursor [Default] already exists
ERR |GLOBAL          |              cursor:252  |21:26:42|17244  |Cursor [Highlight] already exists
DIAG|GLOBAL          |      MissionHandler:1432 |21:26:42|17250  |Expanded game UI file of 'bzeditor_height_1280x1024.cfg' not found. Using default of 'bzeditor_height.cfg'
DIAG|GLOBAL          |      MissionHandler:1432 |21:26:42|17252  |Expanded game UI file of 'bzeditor_color_1280x1024.cfg' not found. Using default of 'bzeditor_color.cfg'
DIAG|GLOBAL          |      MissionHandler:1432 |21:26:42|17272  |Expanded game UI file of 'bzeditor_texture_1280x1024.cfg' not found. Using default of 'bzeditor_texture.cfg'
DIAG|GLOBAL          |      MissionHandler:1432 |21:26:42|17275  |Expanded game UI file of 'bzeditor_water_1280x1024.cfg' not found. Using default of 'bzeditor_water.cfg'
DIAG|GLOBAL          |      MissionHandler:1432 |21:26:42|17329  |Expanded game UI file of 'bzeditor_environ_1280x1024.cfg' not found. Using default of 'bzeditor_environ.cfg'
DIAG|GLOBAL          |      MissionHandler:1432 |21:26:42|17330  |Expanded game UI file of 'bzeditor_object_1280x1024.cfg' not found. Using default of 'bzeditor_object.cfg'
DIAG|GLOBAL          |      MissionHandler:1432 |21:26:42|17333  |Expanded game UI file of 'bzeditor_path_1280x1024.cfg' not found. Using default of 'bzeditor_path.cfg'
DIAG|GLOBAL          |      MissionHandler:1432 |21:26:42|17333  |Expanded game UI file of 'bzeditor_1280x1024.cfg' not found. Using default of 'bzeditor.cfg'
DIAG|GLOBAL          |      MissionHandler:1432 |21:26:42|17566  |Expanded game UI file of 'bzeditor_license_1280x1024.cfg' not found. Using default of 'bzeditor_license.cfg'
DIAG|GLOBAL          |            runcodes:153  |21:26:42|17568  |[View] Entering run code [EDITOR]
DIAG|GLOBAL          |            runcodes:153  |21:26:42|17568  |[Edit] Entering run code [height]
DIAG|GLOBAL          |      MissionHandler:1432 |21:26:43|18331  |Expanded game UI file of 'bzeditor_enter_1280x1024.cfg' not found. Using default of 'bzeditor_enter.cfg'
DIAG|GLOBAL          |            runcodes:153  |21:26:43|18347  |[Edit] Entering run code [height]
DIAG|GLOBAL          |            runcodes:153  |21:26:47|21831  |[Edit] Entering run code [object]
ERR |GLOBAL          |         ParameterDB:578  |21:26:54|28597  |Uhoh - malformed ODF 'ivrecyfact.odf'. Recently opened ODFs:
DIAG|GLOBAL          |         ParameterDB:208  |21:26:54|28597  |Last few opened ODFs:
DIAG|GLOBAL          |         ParameterDB:213  |21:26:54|28597  | 1 : ivrecyfact.odf
DIAG|GLOBAL          |         ParameterDB:213  |21:26:54|28597  | 2 : dunesi.TRN
DIAG|GLOBAL          |         ParameterDB:213  |21:26:54|28597  | 3 : shieldeffect.odf



Spawn

Do you have any way of getting the original data.pak back?
Do you still have the bz2 cd?

Shephren

I suppose i could take the bz 2 folder of one of my friends,these ones are not modded,or do you mean a data,which is like after you installed the game for the first time?
Both types of data i could get,why?Do you think,or do you know,that my data is in a way broken?

Spawn

Either way should be fine if the file is unmodified.  You said that you didn't know if you changed something, so, while it probably isn't the source of the problem, it would be the easiest thing to fix.

Shephren

Ah,i see.Okay,i'll get the install of bz 2 and delete all the other bz 2 things i had before.I hope it'll work after that!

Spawn

Have high hopes and low expectations and you won't be disappointed :P

Shephren

I'm going totally nuts!What a damn piece of...,grrrr.This editor hates me,he HATES me^^
Listen,i've deletet everything related to bz2,even the thing in my documents/my games/battlezone 2.Installed it new,patched it to 1.3pb4a.Opened the Pak.Explorer,loaded the data from the fresh bz2,opened objects,ISDF,Vehicles,ivrecy.opened ivrecy.odf,changed everything to..well,take a look if you want:

[GameObjectClass]
classLabel = "ivrecy"

[CraftClass]

[trackedVehicleClass]

[trackedDeployableClass]

[DeployBuildingClass]
deployName = "ibfact"

[RecyclerVehicleClass]

[Lod1]

named it "ivrecydavid.odf",saved it in the addon folder,started the editor,createt my profile because of the new install of bz2,startet a instant match,opened editor,typed in "ivrecydavid" and guess what he did.Right,he shutted down without any warnings or comments like usual.Bwahrg!

Got a question right now.My odf files i see in the pak.explorer open with openoffice.org 2.4,if i save them,a window pops up,where i can chose which format it shall be saved.For instance :".txt" or ".odt",do you guys use another programm to open existing odf files/Do you can save them as ".odf" files,or do you have to write it after the name of the file like i do?
Example:




Damn,this is going to get on my nerves^^

AHadley

I think I've found the problem. File format/editor confusion. Write your ODFs in Windows' Notepad, and save them in it too. If you look closely, whilst that is saving as an ODF Text document, which is an Open Office format, it is saving with the file extension .ODT. You want this extension to be .ODF. Saving like you are above gives you a double extension - filename.odf.ODT - where the last one is being used as the extension.

Save in Notepad - but make sure you select to save as All Files first, or it will double extend again - this time as .ODF.TXT.

mrtwosheds