Research tree editor
Re: Research tree editor
OK, moving forward with the editor, i need to start figuring out some of the mysteries of the research tree in wz, and hell it sure does has a lot...
So before we get to the big mysteries, lets start off with the small ones.
First off... figuring out the resultcomponent.txt file fields (I do know what the file is for, just need more details)
ok, so we have 6 fields inside the file
#1 Research that produces the component
#2 Name of the component that results from the given research in #1
#3 Type of the component in #2
#4 unknown
#5 unknown
#6 modder signature (or unused whatever you like it best.)
So I have seen that some researchs do use #4 & #5, mostly the weird researches. So, I'm starting off with a little weird one....
Understanding Auto Repair
So looking at research.txt we have
R-Sys-Autorepair-General,Level All,IMAGE_RES_GRPREP,0,IMAGE_RES_COMPUTERTECH,ICCCCONS.PIE,0,RES_SY_AR,0,0,BODY,14400,1,1,0,0,0,0,0,1
ok then we have the resulting component from that
R-Sys-Autorepair-General,AutoRepair,REPAIR,ZNULLREPAIR,REPAIR,6
and then we have the entries on the repair.txt
ZNULLREPAIR,Level All,0,0,0,0,0,0,DEFAULT,0,0,0,100,0
AutoRepair,Level One,0,0,0,0,0,1,DEFAULT,0,0,100,75,0
So how do they work?
So before we get to the big mysteries, lets start off with the small ones.
First off... figuring out the resultcomponent.txt file fields (I do know what the file is for, just need more details)
ok, so we have 6 fields inside the file
#1 Research that produces the component
#2 Name of the component that results from the given research in #1
#3 Type of the component in #2
#4 unknown
#5 unknown
#6 modder signature (or unused whatever you like it best.)
So I have seen that some researchs do use #4 & #5, mostly the weird researches. So, I'm starting off with a little weird one....
Understanding Auto Repair
So looking at research.txt we have
R-Sys-Autorepair-General,Level All,IMAGE_RES_GRPREP,0,IMAGE_RES_COMPUTERTECH,ICCCCONS.PIE,0,RES_SY_AR,0,0,BODY,14400,1,1,0,0,0,0,0,1
ok then we have the resulting component from that
R-Sys-Autorepair-General,AutoRepair,REPAIR,ZNULLREPAIR,REPAIR,6
and then we have the entries on the repair.txt
ZNULLREPAIR,Level All,0,0,0,0,0,0,DEFAULT,0,0,0,100,0
AutoRepair,Level One,0,0,0,0,0,1,DEFAULT,0,0,100,75,0
So how do they work?
Re: Research tree editor
#4 and #5 are the component it auto-replaces, and the type thereof.winsrp wrote:ok, so we have 6 fields inside the file
#1 Research that produces the component
#2 Name of the component that results from the given research in #1
#3 Type of the component in #2
#4 unknown
#5 unknown
#6 modder signature (or unused whatever you like it best.)
Auto-replace isn't used as much as it used to - the most memorable example is probably the auto-replace Ripple -> Archie (no longer active), and the auto-replace Flashlight -> Pulse (which I think still is).
...what do you want to know about it? I don't see anything confusing about what you said.winsrp wrote:Understanding Auto Repair
Re: Research tree editor
So, auto replaces...
In this case you are telling me that ..... Auto Repair, replaces ZNULLREPAIR and that magically makes all my units auto repair itself? No functions no scripts no nothing? So if I put the auto repair line as the first line of the repair.txt then all unit would have auto repair from game start (wild guess here)?
In this case you are telling me that ..... Auto Repair, replaces ZNULLREPAIR and that magically makes all my units auto repair itself? No functions no scripts no nothing? So if I put the auto repair line as the first line of the repair.txt then all unit would have auto repair from game start (wild guess here)?
Re: Research tree editor
let put a more complicated case, how does cyborgs work in terms of researches, and lets put a simple one.
Flamer (cyborg)
This is supposedly given when you research the Flamer, and it will produce the flamer cyborg, but on the research tree, it produces something like the flamer cyborg body not the flamer itself.
resultComponent for flamer
R-Wpn-Flamer01Mk1,CyborgFlamerGrd,BODY,0,0,2
And this relates to the body.txt
CyborgFlamerGrd,Level All,LIGHT,25,95,150,200,cybd_std.pie,100,1,500,12,6,12,6,12,6,12,6,12,6,12,6,0,0
I have seen that on assignweapons.txt there is also a line that relates the cyborg flamer body to the cyborg flamer weapon
Cyb-Flamer-GROUND,CyborgFlamer01,NULL,NULL,0
But what I don't get is
Question: when CyborgFlamerGrd was transformed to Cyb-Flamer-GROUND, so it can be related to the weapon???
Flamer (cyborg)
This is supposedly given when you research the Flamer, and it will produce the flamer cyborg, but on the research tree, it produces something like the flamer cyborg body not the flamer itself.
resultComponent for flamer
R-Wpn-Flamer01Mk1,CyborgFlamerGrd,BODY,0,0,2
And this relates to the body.txt
CyborgFlamerGrd,Level All,LIGHT,25,95,150,200,cybd_std.pie,100,1,500,12,6,12,6,12,6,12,6,12,6,12,6,0,0
I have seen that on assignweapons.txt there is also a line that relates the cyborg flamer body to the cyborg flamer weapon
Cyb-Flamer-GROUND,CyborgFlamer01,NULL,NULL,0
But what I don't get is
Question: when CyborgFlamerGrd was transformed to Cyb-Flamer-GROUND, so it can be related to the weapon???
Re: Research tree editor
I think so. ZNULLREPAIR might be hardcoded, though.winsrp wrote:So, auto replaces...
In this case you are telling me that ..... Auto Repair, replaces ZNULLREPAIR and that magically makes all my units auto repair itself? No functions no scripts no nothing? So if I put the auto repair line as the first line of the repair.txt then all unit would have auto repair from game start (wild guess here)?
Oh, man. This is the one part of the research tree I've never understood. I think it's handled in the wzscripting or something.winsrp wrote:let put a more complicated case, how does cyborgs work in terms of researches, and lets put a simple one.
Flamer (cyborg)
This is supposedly given when you research the Flamer, and it will produce the flamer cyborg, but on the research tree, it produces something like the flamer cyborg body not the flamer itself.
It's not just "researching the body unlocks all entries using that body in templates.txt" - I think I've tested that hypothesis.
Re: Research tree editor
hmmm.... starting to get weird then... I like that...
then I would need to see how the CyborgFlamerGrd is transformed to Cyb-Flamer-GROUND in order to relate the body to the weapon.
Since it happens the same for all cyborgs, they all produce a body, and that body magically becomes a cyborg, but there is no info on how assignweapons.txt is related to body.txt...
Who offers to give it a deep research on how this works?
then I would need to see how the CyborgFlamerGrd is transformed to Cyb-Flamer-GROUND in order to relate the body to the weapon.
Since it happens the same for all cyborgs, they all produce a body, and that body magically becomes a cyborg, but there is no info on how assignweapons.txt is related to body.txt...
Who offers to give it a deep research on how this works?
Re: Research tree editor
hey.... wait a minute, what does templates.txt has to do with this? ain't it for SP only?
Re: Research tree editor
Erm... you realize that all units are templates, right? Everything you see in the Manufacture or Design screens are templates. Cyborgs (and Transports) included. When you research a cyborg, activating the cyborg body component will make the corresponding template manufacturable.winsrp wrote:hey.... wait a minute, what does templates.txt has to do with this? ain't it for SP only?
...and how can something involve assignweapons but not templates? assignweapons assigns weapons to templates...
Re: Research tree editor
so... the templates.txt and assignedweapons.txt are just a way to avoid having a design screen for certain types of units, i.e. cyborgs on which you only have 2 parts, a body and a weapon, no propulsion, but in this case, there is no standard body for cyborgs, they all have a different body since the body pie contains the weapon inside it, but, it must be given the behavior when you assign it to a weapon,
In this case i can have the flamer cyborg body shooting lancer rockets if I make the wrong assignment?
Dang... what a complicated game...
In this case i can have the flamer cyborg body shooting lancer rockets if I make the wrong assignment?
Dang... what a complicated game...
Re: Research tree editor
Yes, but all of them have all three parts.winsrp wrote:so... the templates.txt and assignedweapons.txt are just a way to avoid having a design screen for certain types of units, i.e. cyborgs on which you only have 2 parts, a body and a weapon, no propulsion, but in this case, there is no standard body for cyborgs, they all have a different body since the body pie contains the weapon inside it, but, it must be given the behavior when you assign it to a weapon,
Cyborgs have a propulsion, too. They all have the same propulsion. It's called Cyborg Propulsion. You can see it here:
http://guide.wz2100.net/bp/
Yep.winsrp wrote:In this case i can have the flamer cyborg body shooting lancer rockets if I make the wrong assignment?
Re: Research tree editor
so the info is now complete.... and I shall make it all work together... somehow... in the editor.
Thanks for the time Zarel.
Thanks for the time Zarel.
Re: Research tree editor
Winsrp, how are you making the editor? If you are using C/C++/C# or something along those lines, would it be possible for you to use Qt, so it can be used on all platforms?winsrp wrote:so the info is now complete.... and I shall make it all work together... somehow... in the editor.
If not, would you consider releasing the source code, so maybe other people can port it to Qt?
and it ends here.
Re: Research tree editor
well I'm using vb.net 2008 along with linq, so I'm not sure if the linq part can be ported, at least not that easy.
But if you want the code then I will gladly give it.
But if you want the code then I will gladly give it.
Re: Research tree editor
and what the heck is Qt?
Re: Research tree editor
anyway, back on questions, where can I find a list of the available functions? I know functions.txt has some reation between the the researches, and the actual funcion with parameters, can someone give me the list of functions and what their parameters are for.... so far I have
- Production
Research Upgrade
Repair Droid
Power Generator
Resource
Production Upgrade
Weapon Upgrade
Wall Function
Structure Upgrade
WallDefence Upgrade
Research
Repair Upgrade
Power Upgrade
VehicleBody Upgrade
VehicleConst Upgrade
VehicleECM Upgrade
VehicleRepair Upgrade
VehicleSensor Upgrade
ReArm
ReArm Upgrade