Need some hints about how game works

Discuss the future of Warzone 2100 with us.
winsrp
Trained
Trained
Posts: 417
Joined: 14 May 2008, 17:00

Need some hints about how game works

Post by winsrp »

Well im starting off a mod, preatty much to understand how the game works, and end up going into the code in the future to help devs out fixing bugs and stuff.

i have been looking around the files the game has, images and stuff, and read all the wiki about modding, and still have some doubts....

#1, Images for researchs, where are they?, i found preaty much all images except those.
#2, after reading all the mods faq about researchs, how do all the files interconect?

Ill start on modding/changing the research tree, can this be done in the mod, or requires code change?

Thanks.
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Need some hints about how game works

Post by DevUrandom »

winsrp wrote: #1, Images for researchs, where are they?, i found preaty much all images except those.
Maybe you mean something different, but those are not images but models.
winsrp wrote: #2, after reading all the mods faq about researchs, how do all the files interconect?
I'll give an example how I added a building+research:

Code: Select all

stats/structures.txt:
ExampleBuilding,DEFENSE,Level All,HARD,0,1,1,Concrete,10,1,1,100,10,100,0,10,0,1,ZNULLECM,DefaultSensor1Mk1,1,examplebuilding.pie,0,0,0

stats/research/multiplayer/research.txt:
R-ExampleBuilding,Level One-Two,IMAGE_RES_DEFENCE,0,IMAGE_RES_SYSTEMTECH,0,0,RES_ENGIN1,ExampleBuilding,0,STRUCTURE,1200,1,1,0,0,0,1,0,0

stats/research/multiplayer/prresearch.txt:
R-ExampleBuilding,R-Sys-Engineering01,0

stats/research/multiplayer/resultstructure.txt:
R-ExampleBuilding,ExampleBuilding,0,0

messages/strings/names.txt:
R-ExampleBuilding             _("Example Building")
ExampleBuilding        _("Example Building")

wrf/piestats.wrf:
directory      "structs"
file           IMD     "examplebuilding.pie"
All lines were added to the respective files.
R-Something is the Warzone convention for naming research identifiers.

First I added an ExampleBuilding structure and a R-ExampleBuilding research.
Then I told WZ that the R-ExampleBuilding research depends on the Sys-Engineering01 research.
After that, I tought it that researching R-ExampleBuilding allows the player to build an ExampleBuilding.
An ExampleBuilding shall be displayed ingame as "Example Building".
Finally I told WZ where to find the new model file examplebuilding.pie.
(The file was added as structs/examplebuilding.pie.)
winsrp wrote: Ill start on modding/changing the research tree, can this be done in the mod, or requires code change?
If you just change something, you dont need to change any code. However, if you want to add an entirely new building with completely new rules (like a radar jammer, a terra former, ...) you would need to add that functionality to the sourcecode.
winsrp
Trained
Trained
Posts: 417
Joined: 14 May 2008, 17:00

Re: Need some hints about how game works

Post by winsrp »

DevUrandom thats one nice piece of information, and thats exactly what i need to set off.

Now, another thing i noticed kindda wrong on the wiki was that on the text editing part of the the modding section has an specification of what is each field on the txt, but for most files i found that the file had more values than the actual explanation, as an example, research.txt has 2 more values than the ones mentioned on the wiki, is there any chance that will be updated soon?, and maybe with a better explanation of what does each field?

Thanks for all the help dude. You are setting me up for a new mod here.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Need some hints about how game works

Post by Per »

The wiki is supposed to be user editable, so if you find something that is wrong, make a note in it that it is wrong, and if you find out what the correct answer is - add it!  ;D
"Make a man a fire, you keep him warm for a day. Set a man on fire, you keep him warm for the rest of his life."
winsrp
Trained
Trained
Posts: 417
Joined: 14 May 2008, 17:00

Re: Need some hints about how game works

Post by winsrp »

cool ill try to figure out things then update it, but first off ill start with some models.

Here is a pre-model of the factory i did in a couple mins, i know it has to be simple, but how much simple should it be? still working on materials.

ImageImage

By the way, i also made some sketches of other weapons such as tank turrets, AA, rockets and stuff, so feel free to post some of your ideas if you can draw something scan it and upload it, it should be a lot better, don't have to be a top sketcher, this way i can expand my idea base....

And another question... lets say i want to put an AA model, that has well, rockets.... can i make it shoot rockets at planes by just setting it on the weapons file, or, some coding is needed since there are no rockets in AA so far, like the one on the tank killer turret?
User avatar
Buginator
Professional
Professional
Posts: 3285
Joined: 04 Nov 2007, 02:20

Re: Need some hints about how game works

Post by Buginator »

winsrp wrote:cool ill try to figure out things then update it, but first off ill start with some models.

Here is a pre-model of the factory i did in a couple mins, i know it has to be simple, but how much simple should it be? still working on materials.

ImageImage
Looks pretty good!
As for how simple, I know I posted about this before, but I am unsure which post it was.
I *think* it is under 200 polys, I will check (if I remember ;)).
Texture size can be anything really (just needs to be POW2--I think), but right now, it isn't very high.
By the way, i also made some sketches of other weapons such as tank turrets, AA, rockets and stuff, so feel free to post some of your ideas if you can draw something scan it and upload it, it should be a lot better, don't have to be a top sketcher, this way i can expand my idea base....

And another question... lets say i want to put an AA model, that has well, rockets.... can i make it shoot rockets at planes by just setting it on the weapons file, or, some coding is needed since there are no rockets in AA so far, like the one on the tank killer turret?
There are Vindicator & Avenger SAMS available that you can use.
winsrp
Trained
Trained
Posts: 417
Joined: 14 May 2008, 17:00

Re: Need some hints about how game works

Post by winsrp »

yeah your right... cool about that...

Now i have some other ideas, here are some images, but if you would like me to do something specific let me know, ill try making a mod with new pie files for all models, but you never know there could be some new thing out there... and 200 polis... thats insanely low amount... i think i need to change the 9 AA SAM to 3 or 2....

ImageImageImage
elio
Regular
Regular
Posts: 508
Joined: 09 Jun 2007, 22:11

Re: Need some hints about how game works

Post by elio »

nice, afaik we need some cool bodies with the ability to build on two weapons (only heavy bodies)
the tank don't have to be symmetrical i think

perhaps you've a good idea? :)
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Need some hints about how game works

Post by DevUrandom »

winsrp
Trained
Trained
Posts: 417
Joined: 14 May 2008, 17:00

Re: Need some hints about how game works

Post by winsrp »

well... i wasn't thinking about body or tracks just yet... but here is a quick sketch of something that could be 2 levels. don't look to much at the textures since they still suck, i just painted them with the first thing i came across.

And i can even make a 3, 4 or even 5 turret body if you guys would like that... it would be a mobile fortress... lol

ImageImage
elio
Regular
Regular
Posts: 508
Joined: 09 Jun 2007, 22:11

Re: Need some hints about how game works

Post by elio »

it looks not bad at all, could you try to import some pie-weapon models to show how it looks?
it's important that it fits in warzone's look and feel :)

don't hurry, and if you get stuck, no problem :), we really have to redo the pie's (in particular the textures). if you're interested you could help me as soon as i finish my current job. i don't know much where we are with enhancing the polygon count.

elio
winsrp
Trained
Trained
Posts: 417
Joined: 14 May 2008, 17:00

Re: Need some hints about how game works

Post by winsrp »

well, the 3d topic with nice new models will continue here... viewtopic.php?f=10&t=1780

and now that elio mentions it, here comes more questions. Im using 3Ds Max 9, not the pie sucks so much editor ive seen around, now ive seen the 3ds to pie program (i havent really tried it yet), but in not really sure if it will work the other way around... for importing into 3D max.

Ill try exporting from 3ds to pie in when i get home, and by the way... whats the name of the pie for the small tank turret to make a mod to replace that one.?
elio
Regular
Regular
Posts: 508
Joined: 09 Jun 2007, 22:11

Re: Need some hints about how game works

Post by elio »

i think its gnlcan.pie (couldn't check, because 3ds2pie isn't avaiable for me atm)

Code: Select all

warzone/data/base/messages/strings/names.txt -> Cannon1Mk1				_("Light Cannon")
warzone/data/base/stats/weapons.txt -> Cannon1Mk1,Level All,75,375,1000,1,15,200,GNLCAN.PIE,TRLCAN.PIE,FXCan20m.PIE,FXcam20.PIE,FXGRDexl.PIE,FXGRDexl.PIE,FXSSplsh.PIE,0,640,960,70,50,40,2,0,0,30,16,20,5,0,0,0,10,100,1000,20,YES,KINETIC,CANNON,DIRECT,ANTI TANK,180,90,-90,YES,NO,100,0,YES,30,0,0,1,0