Problems MODING the new 3.2, cannot add new Cyborg

Get some help with creating maps or modding.
Need a map editor or other tools, look here!
User avatar
Doruletz
Trained
Trained
Posts: 112
Joined: 17 Sep 2015, 06:00
Location: Tennessee, USA

Problems MODING the new 3.2, cannot add new Cyborg

Post by Doruletz »

Hi.
I love WZ2100, but I don't really like to play online multiplayer games, instead I enjoy myself creating different mods and maps and playing against AI.

In the previous versions (v3.1rc2 is the one I played the longest) it was a breeze to MOD. Add weapons, bodies, etc.
I choosed to hang on to my Linux Mint 17 MATE mainly because of that, but the support for that distro will end come April, so I decided to install the newest Linux Mint 19 MATE.
Right now, my Linux Mint 19 MATE offers Warzone 2100 v3.2.1-3 in its software repository, so this is what I'm messing up with nowadays.
So far I was able to add droid weapons to both ground vehicles and VTOLS.

Ever since they change the file extensions from ".TXT" to ".JSON", everything is different and a whole lot more complicated. No more comma separated files that can be opened in LibreOffice Calc for easy editing and comparing stats, etc, etc...
But I'm trying as hard as humanly possible to adapt.

The Americans brilliantly summarized one of the greatest truths of life in just one phrase:

IF IT AIN'T BROKE, DON'T FIX IT.

Why does everything needs to be changed? Why do we always feel the need for a new version of "whatever" every few months???

PLEASE HELP!

My problems started when I wanted to add a new Super Cyborg...
I added entries in "/STATS/weapons.json", "STATS/research.json", and the appropriate tier "/MESSAGES/resmessagesXZ.json"
Game starts, but the new Cyborg fails to appear, even in DEBUG Mode.

I will list my entries here, NOTE that the listed new weapon type (Heavy MRL) for this Heavy Cyborg was already tested as being successfully added and working for both Tanks and VTOLs.

"/STATS/weapons.json" entry:

Code: Select all

    "Cyb-Hvywpn-HvyMRL": {
        "buildPoints": 100,
        "buildPower": 50,
        "damage": 80,
        "effectSize": 25,
        "explosionWav": "lrgexpl.ogg",
        "faceInFlight": 1,
        "facePlayer": 1,
        "firePause": 1,
        "flags": "ShootAir",
        "flightGfx": "FXMflare.PIE",
        "flightSpeed": 2000,
        "hitGfx": "FXGRDexl.PIE",
        "hitpoints": 60,
        "id": "Cyb-Hvywpn-HvyMRL",
        "lightWorld": 1,
        "longHit": 90,
        "longRange": 1024,
        "maxElevation": 90,
        "minElevation": -60,
        "minRange": 64,
        "minimumDamage": 33,
        "missGfx": "fxmexp.PIE",
        "model": "sc_tk.pie",
        "mountModel": "scbody.pie",
        "movement": "INDIRECT",
        "muzzleGfx": "FXMRoc.PIE",
        "name": "Super Heavy-Rocketeer",
        "numExplosions": 2,
        "numRounds": 4,
        "radiusDamage": 30,
        "radiusLife": 30,
        "rotate": 180,
        "reloadTime": 64,
        "waterGfx": "fxssplsh.PIE",
        "weaponClass": "KINETIC",
        "weaponEffect": "ARTILLERY ROUND",
        "weaponSubClass": "ROCKET",
        "weaponWav": "rocket.ogg",
        "weight": 120
    },
"STATS/research.json" entry:

Code: Select all

    "R-Cyborg-Hvywpn-HvyMRL": {
        "iconID": "IMAGE_RES_CYBORGTECH",
        "id": "R-Cyborg-Hvywpn-HvyMRL",
        "msgName": "RES_CYW_H_RK",
        "name": "Super Heavy-Rocketeer",
        "requiredResearch": [
            "R-Wpn-Rocket-MRLHvy"
        ],
        "researchPoints": 100,
        "researchPower": 75,
        "resultComponents": [
            "Cyb-Hvywpn-HvyMRL"
        ],
        "statID": "Rocket-MRLHvy"
    },
And finally, "/MESSAGES/resmessagesall.json" entry:

Code: Select all

    "RES_CYW_H_RK": {
        "id": "RES_CYW_H_RK",
        "imdName": "MICAPSUL.pie",
        "sequenceName": "res_droid.ogg",
        "text": [
            "New Cyborg Available",
            "Fires salvoes of mini-rockets",
            "Body Points: Medium",
            "Requires Cyborg factory to produce"
        ]
    },
Did I miss anything? Do I need to add more stuff in some other location that I'm unaware of???

Any help would be greatly appreciated.
Thanks

************************************************************
EDIT
************************************************************
No luck with adding defense structures either...
Again, what gives??
What do I think about Window$ ??? Just see my AVATAR...
User avatar
Doruletz
Trained
Trained
Posts: 112
Joined: 17 Sep 2015, 06:00
Location: Tennessee, USA

Re: Problems MODING the new 3.2, cannot add new Cyborg

Post by Doruletz »

Somebody?? Anybody??

It's been a while since I last used this forum, but I remember that answers were always quick to appear....
What do I think about Window$ ??? Just see my AVATAR...
User avatar
Berg
Regular
Regular
Posts: 2204
Joined: 02 Sep 2007, 23:25
Location: Australia

Re: Problems MODING the new 3.2, cannot add new Cyborg

Post by Berg »

Doruletz wrote: 28 Oct 2018, 16:05 It's been a while since I last used this forum, but I remember that answers were always quick to appear....
I looked at forum yesterday I did not see this post.
Now I see it I don’t think one day is long we all have to sleep.
I don't know how the json files work but i think you might find examples of how to do what you want in the addons section.
There is one mod in the section http://addons.wz2100.net/?version=3.2.3 ... ddon_type=
Hope it helps
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 938
Joined: 26 Sep 2016, 19:56

Re: Problems MODING the new 3.2, cannot add new Cyborg

Post by Berserk Cyborg »

For cyborg units you'll need to add a template into the templates.json file since they are not built in the design menu like regular units or VTOLs.

example:

Code: Select all

"Cyb-Hvy-A-T": {
        "available": true,
        "body": "CyborgHeavyBody",
        "id": "Cyb-Hvy-A-T",
        "name": "Super Scourge Cyborg",
        "propulsion": "CyborgLegs",
        "type": "CYBORG_SUPER",
        "weapons": [
            "Cyb-Hvywpn-A-T"
        ]
 },
For defense structures, make sure you add a new structure into structures.json and unlock it from a research item.
Forgon
Code contributor
Code contributor
Posts: 298
Joined: 07 Dec 2016, 22:23

Re: Problems MODING the new 3.2, cannot add new Cyborg

Post by Forgon »

Doruletz wrote: 28 Oct 2018, 07:47 [...]
So far I was able to add droid weapons to both ground vehicles and VTOLS.

Ever since they change the file extensions from ".TXT" to ".JSON", everything is different and a whole lot more complicated. No more comma separated files that can be opened in LibreOffice Calc for easy editing and comparing stats, etc, etc...
[...]

My problems started when I wanted to add a new Super Cyborg...
I added entries in "/STATS/weapons.json", "STATS/research.json", and the appropriate tier "/MESSAGES/resmessagesXZ.json"
Game starts, but the new Cyborg fails to appear, even in DEBUG Mode.

I will list my entries here, NOTE that the listed new weapon type (Heavy MRL) for this Heavy Cyborg was already tested as being successfully added and working for both Tanks and VTOLs.

"/STATS/weapons.json" entry:

Code: Select all

    "Cyb-Hvywpn-HvyMRL": {
        "buildPoints": 100,
        "buildPower": 50,
        "damage": 80,
        "effectSize": 25,
        "explosionWav": "lrgexpl.ogg",
        "faceInFlight": 1,
        "facePlayer": 1,
        "firePause": 1,
        "flags": "ShootAir",
        "flightGfx": "FXMflare.PIE",
        "flightSpeed": 2000,
        "hitGfx": "FXGRDexl.PIE",
        "hitpoints": 60,
        "id": "Cyb-Hvywpn-HvyMRL",
        "lightWorld": 1,
        "longHit": 90,
        "longRange": 1024,
        "maxElevation": 90,
        "minElevation": -60,
        "minRange": 64,
        "minimumDamage": 33,
        "missGfx": "fxmexp.PIE",
        "model": "sc_tk.pie",
        "mountModel": "scbody.pie",
        "movement": "INDIRECT",
        "muzzleGfx": "FXMRoc.PIE",
        "name": "Super Heavy-Rocketeer",
        "numExplosions": 2,
        "numRounds": 4,
        "radiusDamage": 30,
        "radiusLife": 30,
        "rotate": 180,
        "reloadTime": 64,
        "waterGfx": "fxssplsh.PIE",
        "weaponClass": "KINETIC",
        "weaponEffect": "ARTILLERY ROUND",
        "weaponSubClass": "ROCKET",
        "weaponWav": "rocket.ogg",
        "weight": 120
    },
"STATS/research.json" entry:

Code: Select all

    "R-Cyborg-Hvywpn-HvyMRL": {
        "iconID": "IMAGE_RES_CYBORGTECH",
        "id": "R-Cyborg-Hvywpn-HvyMRL",
        "msgName": "RES_CYW_H_RK",
        "name": "Super Heavy-Rocketeer",
        "requiredResearch": [
            "R-Wpn-Rocket-MRLHvy"
        ],
        "researchPoints": 100,
        "researchPower": 75,
        "resultComponents": [
            "Cyb-Hvywpn-HvyMRL"
        ],
        "statID": "Rocket-MRLHvy"
    },
And finally, "/MESSAGES/resmessagesall.json" entry:

Code: Select all

    "RES_CYW_H_RK": {
        "id": "RES_CYW_H_RK",
        "imdName": "MICAPSUL.pie",
        "sequenceName": "res_droid.ogg",
        "text": [
            "New Cyborg Available",
            "Fires salvoes of mini-rockets",
            "Body Points: Medium",
            "Requires Cyborg factory to produce"
        ]
    },
Did I miss anything? Do I need to add more stuff in some other location that I'm unaware of???
[...]
No luck with adding defense structures either...
[...]
You forgot to add an entry for your cyborg to the file './stats/templates.json', inside either './data/base' (for campaign mods) or './data/mp' (for skirmish/multiplayer mods). It should look as below:

Code: Select all

    "Cyb-Hvy-Rocket": {
        "available": true,
        "body": "CyborgHeavyBody",
        "id": "Cyb-Hvy-Rocket",
        "name": "Super Heavy-Rocketeer",
        "propulsion": "CyborgLegs",
        "type": "CYBORG_SUPER",
        "weapons": [
            "Cyb-Hvywpn-HvyMRL"
        ]
    },
If your mod is for skirmish/multiplayer games, I also suggest that you add your research item "R-Cyborg-Hvywpn-HvyMRL" to the array "CONST_TECH_THREE" in './data/mp/multiplay/script/camTechEnabler.js', so that your cyborg is instantly available in T3 games.
User avatar
Doruletz
Trained
Trained
Posts: 112
Joined: 17 Sep 2015, 06:00
Location: Tennessee, USA

Re: Problems MODING the new 3.2, cannot add new Cyborg

Post by Doruletz »

Berg wrote: 28 Oct 2018, 20:56 I looked at forum yesterday I did not see this post.
Now I see it I don’t think one day is long we all have to sleep.
I don't know how the json files work but i think you might find examples of how to do what you want in the addons section.
There is one mod in the section http://addons.wz2100.net/?version=3.2.3 ... ddon_type=
Hope it helps
Funny and helpful, as always...
Thanks, Berg, you're always reliable.
Last edited by Doruletz on 30 Oct 2018, 19:42, edited 1 time in total.
What do I think about Window$ ??? Just see my AVATAR...
User avatar
Doruletz
Trained
Trained
Posts: 112
Joined: 17 Sep 2015, 06:00
Location: Tennessee, USA

Re: Problems MODING the new 3.2, cannot add new Cyborg

Post by Doruletz »

.

Thank you Berserk Cyborg.
Berserk Cyborg wrote: 28 Oct 2018, 21:44 For cyborg units you'll need to add a template into the templates.json file since they are not built in the design menu like regular units or VTOLs.
.....
For defense structures, make sure you add a new structure into structures.json and unlock it from a research item.
And last, but not least, thank you Forgon.
Forgon wrote: 28 Oct 2018, 22:23 You forgot to add an entry for your cyborg to the file './stats/templates.json', inside either './data/base' (for campaign mods) or './data/mp' (for skirmish/multiplayer mods). It should look as below:
......................
If your mod is for skirmish/multiplayer games, I also suggest that you add your research item "R-Cyborg-Hvywpn-HvyMRL" to the array "CONST_TECH_THREE" in './data/mp/multiplay/script/camTechEnabler.js', so that your cyborg is instantly available in T3 games.
What do I think about Window$ ??? Just see my AVATAR...
User avatar
Doruletz
Trained
Trained
Posts: 112
Joined: 17 Sep 2015, 06:00
Location: Tennessee, USA

Re: Problems MODING the new 3.2, cannot add new Cyborg

Post by Doruletz »

.

Slightly related to Topic....

Are the AIs in v3.2, especially NULLBOT cheating when on INSANE setting???
Cause it sure feels like it !!!
I mean I shoot them and they barely feel a scratch, plus I have more oil derricks and they still bring much more units to the fight....
Sounds to me like a Biffer Baker + More Power cheat combination, really. :lol2: :lol2: :lol2: :lol2: :lol2: :lol2:
What do I think about Window$ ??? Just see my AVATAR...
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Problems MODING the new 3.2, cannot add new Cyborg

Post by NoQ »

The game gives double power from derricks to all AIs on Insane difficulty, and reduced power on Easy difficulty. That's the only cheat present and specific AIs cannot opt out of it. When you click Insane, you get what you ask for. Previously Insane had no effect at all compared to Hard, on any of the AIs, which is clearly worse.

P.S. I highly support the conversion to JSON. If you didn't like it, you had years to voice your opinion even before 3.2 was out. It was actively discussed back then. And 3.2 was out for years now. Because you didn't do this, it's clear to me that you don't care at all about what format we use for stats, no matter how much you shout or write in your favorite bold blue font. Intentions are a really terrible thing to lie about. You shouldn't yell at people to do things for you that literally nobody cares about, even you. Please stop.
Forgon
Code contributor
Code contributor
Posts: 298
Joined: 07 Dec 2016, 22:23

Re: Problems MODING the new 3.2, cannot add new Cyborg

Post by Forgon »

NoQ wrote: 31 Oct 2018, 17:59 The game gives double power from derricks to all AIs on Insane difficulty, and reduced power on Easy difficulty. That's the only cheat present and specific AIs cannot opt out of it. [...]
That implies Nullbot is no longer deity-cheating. Since when is that true?
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Problems MODING the new 3.2, cannot add new Cyborg

Post by NoQ »

Whooops :oops: You're right, yes, it's still visibility-cheating, on pretty much all difficulty levels, though it doesn't really matter on Easy difficulty. Which doesn't mean that the AI's units see farther in combat; it's only about having full knowledge about the game state within the script and being able to react to it.

It is indeed a sacrifice of purity, but it doesn't bother me too much because i believe it gives NullBot a fairly minimal advantage that is easily balanced out by human intuition, while it also increases the fun of playing against the AI. The only time it really matters is when the opponent is making a tech transition - NullBot is able to adapt to it immediately without scouting, i.e. it's harder to catch the AI off-guard with a surprise transition from pure tanks to pure cyborgs or with a surprise VTOL attack. I believe that the amount of fun that such adaptiveness adds to the game greatly outweights the annoyance of knowing that the AI visibility-cheats. It should be possible to achieve a similar effect without visibility-cheating, but it's much harder to implement.
User avatar
Doruletz
Trained
Trained
Posts: 112
Joined: 17 Sep 2015, 06:00
Location: Tennessee, USA

Re: Problems MODING the new 3.2, cannot add new Cyborg

Post by Doruletz »

NoQ, thanks for explaining the INSANE setting dilemma to me. So, besides the AI drawing double the power on INSANE, they don't cheat in any other way?
Such as maybe building structures and units faster and cheaper, having a longer sensor range, more weapon damage, faster research times, etc...
.
NoQ wrote: 31 Oct 2018, 17:59 The game gives double power from derricks to all AIs on Insane difficulty, and reduced power on Easy difficulty. That's the only cheat present and specific AIs cannot opt out of it. When you click Insane, you get what you ask for. Previously Insane had no effect at all compared to Hard, on any of the AIs, which is clearly worse.
.
NoQ, you being one of the veterans as well as top contributors here, I respect you and have always appreciated your input.
Furthermore, over the years, I have watched all the gameplay and tips videos you posted, as well as read most of your input in this forum.

That being said, I always hated this preset conclusion that by writing something in BOLD you are actually shouting or yelling.
What I do is make sure that part of text sticks out, it's more visible and easier to find, that's all. I'm not yelling.
And please don't call me a liar. All I did was stated an opinion...
OK, to conclude, thanks again for your input, and have a nice day.
.
NoQ wrote: 31 Oct 2018, 17:59 P.S. I highly support the conversion to JSON. If you didn't like it, you had years to voice your opinion even before 3.2 was out. It was actively discussed back then. And 3.2 was out for years now. Because you didn't do this, it's clear to me that you don't care at all about what format we use for stats, no matter how much you shout or write in your favorite bold blue font. Intentions are a really terrible thing to lie about. You shouldn't yell at people to do things for you that literally nobody cares about, even you. Please stop.
Last edited by Doruletz on 02 Nov 2018, 13:02, edited 3 times in total.
What do I think about Window$ ??? Just see my AVATAR...
User avatar
Doruletz
Trained
Trained
Posts: 112
Joined: 17 Sep 2015, 06:00
Location: Tennessee, USA

Re: Problems MODING the new 3.2, cannot add new Cyborg

Post by Doruletz »

Forgon wrote: 28 Oct 2018, 22:23 You forgot to add an entry for your cyborg to the file './stats/templates.json', inside either './data/base' (for campaign mods) or './data/mp' (for skirmish/multiplayer mods). It should look as below:
......................
If your mod is for skirmish/multiplayer games, I also suggest that you add your research item "R-Cyborg-Hvywpn-HvyMRL" to the array "CONST_TECH_THREE" in './data/mp/multiplay/script/camTechEnabler.js', so that your cyborg is instantly available in T3 games.
Forgon, I have added the Heavy Cyborg entry in the "templates.json" file, as you pointed out, and the new Cyborg is now available as soon as the weapon research is done, just as it should...
What I was yet unable to do, is follow your second advice, about making this Heavy Cyborg available in T3 games.
I cannot find the file you specified, or the file path you indicated.
Maybe you can be so kind as to revise it all, and give a correct file name and path for that T3 entry.
Thanks again for all your help

EDIT:

I was finally able to complete the T3 availability entry/editing of the newly added Heavy Cyborg as well.
Here is the correct file path and name:
"/multiplay/script/cam3tech.vlo"

And the entries I edited are:
1 - I increased the number of entries in the "camTechB" subsection from the default 17 to 18, to account for the newly added entry (line #7 in the file), and
2 - I also added this line at the end of said subsection:

Code: Select all

camTechB	[17]	RESEARCHSTAT	"R-Cyborg-Hvywpn-HvyMRL"
Last edited by Doruletz on 02 Nov 2018, 13:41, edited 5 times in total.
What do I think about Window$ ??? Just see my AVATAR...
User avatar
Doruletz
Trained
Trained
Posts: 112
Joined: 17 Sep 2015, 06:00
Location: Tennessee, USA

Re: Problems MODING the new 3.2, cannot add new Cyborg

Post by Doruletz »

NoQ, after a bit of practice and all the help I got from y'all here, I started to develop a certain "beginners" degree of proficiency working with ".JSON" files.
The only thing I still miss from the old ".TXT" files, is the ability to open them in LibreOfficeCalc for easy comparison and editing of all individual stats values (damage, range, armor, hit points, build points and power, hitpoints, associated .PIE file names, etc)
I did however found a way to improvise, by using the stats from similar weapon and/or structure entris from the previous versions, that are in the ".TXT" format. After I edit and save those in LibreOfficeCalc, comes the painstaking work of copy/paste editing the correspondent entries in the ".JSON" files, line by line, by line...
Guess you can't have your cake and eat it too, right? :lol2: :lol2: :lol2:
.
.
NoQ wrote: 31 Oct 2018, 17:59 P.S. I highly support the conversion to JSON. If you didn't like it, you had years to voice your opinion even before 3.2 was out. It was actively discussed back then. And 3.2 was out for years now. Because you didn't do this, it's clear to me that you don't care at all about what format we use for stats, no matter how much you shout or write in your favorite bold blue font. Intentions are a really terrible thing to lie about. You shouldn't yell at people to do things for you that literally nobody cares about, even you. Please stop.
What do I think about Window$ ??? Just see my AVATAR...
Forgon
Code contributor
Code contributor
Posts: 298
Joined: 07 Dec 2016, 22:23

Re: Problems MODING the new 3.2, cannot add new Cyborg

Post by Forgon »

Doruletz wrote: 02 Nov 2018, 12:58
Forgon wrote: 28 Oct 2018, 22:23 You forgot to add an entry for your cyborg to the file './stats/templates.json', inside either './data/base' (for campaign mods) or './data/mp' (for skirmish/multiplayer mods). It should look as below:
......................
If your mod is for skirmish/multiplayer games, I also suggest that you add your research item "R-Cyborg-Hvywpn-HvyMRL" to the array "CONST_TECH_THREE" in './data/mp/multiplay/script/camTechEnabler.js', so that your cyborg is instantly available in T3 games.
Forgon, I have added the Heavy Cyborg entry in the "templates.json" file, as you pointed out, and the new Cyborg is now available as soon as the weapon research is done, just as it should...
What I was yet unable to do, is follow your second advice, about making this Heavy Cyborg available in T3 games.
I cannot find the file you specified, or the file path you indicated. [...]
I'm sorry. I overlooked that you use version 3.2. and gave advice for the latest developer version, in which the location of technology level research lists differs due to

`
commit d31f6a2c704ada8f46957a34279af78deafdeec7
Author: KJeff01 <[email protected]>
Date: Sun Dec 10 10:37:04 2017 -0600

Move multiplayer tech levels to JS.

Removes research topics that were not present in the current
multiplayer research file.

Qtscript: Adds getMultiTechLevel function.
'
Post Reply