Artillery ONLY Mod - Need help

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

Artillery ONLY Mod - Need help

Post by Doruletz »

I created an Artillery ONLY Mod by simply changing the designable option in "stats / weapons.json" for all direct fire weapons from 1 to 0.

Code: Select all

"designable": 1,
changed to

Code: Select all

"designable": 0,
While this prevents me from designing and producing any direct fire units, it does not impose the same restrictions for the AI player in Skirmish Games. The Bonecrusher AI comes at me with direct fire weapon units regardless.
I cannot figure out why the AI disregards the weapon specs I modify in "stats / weapons.json"
Can anybody please help me with this problem?
Thank you.
What do I think about Window$ ??? Just see my AVATAR...
User avatar
Black Project
Regular
Regular
Posts: 751
Joined: 04 Apr 2008, 20:53

Re: Artillery ONLY Mod - Need help

Post by Black Project »

Doruletz wrote: 09 Apr 2025, 01:43While this prevents me from designing and producing any direct fire units, it does not impose the same restrictions for the AI player in Skirmish Games. The Bonecrusher AI comes at me with direct fire weapon units regardless.
I cannot figure out why the AI disregards the weapon specs I modify in "stats / weapons.json"
Can anybody please help me with this problem?
Thank you.
Inside "stats/research.json", try deleting the "requiredResearch" field of all researchable direct-fire weapons. Since the AI bypasses the "designable" restriction, hopefully this workaround can solve this problem by making all direct-fire weapon research topics give nothing to players, be it human or AI.

Here's an example for the Heavy Cannon

BEFORE:

Code: Select all

	"R-Wpn-Cannon3Mk1": {
		"iconID": "IMAGE_RES_WEAPONTECH",
		"id": "R-Wpn-Cannon3Mk1",
		"msgName": "RES_CN3MK1",
		"name": "Heavy Cannon",
		"redComponents": [
			"Cannon2A-TMk1"
		],
		"requiredResearch": [
			"R-Wpn-Cannon-Damage05",
			"R-Vehicle-Metals03",
			"R-Wpn-Cannon2Mk1"
		],
		"researchPoints": 8800,
		"researchPower": 275,
		"resultComponents": [
			"Cannon375mmMk1"
		],
		"statID": "Cannon375mmMk1"
	},
AFTER:

Code: Select all

	"R-Wpn-Cannon3Mk1": {
		"iconID": "IMAGE_RES_WEAPONTECH",
		"id": "R-Wpn-Cannon3Mk1",
		"msgName": "RES_CN3MK1",
		"name": "Heavy Cannon",
		"redComponents": [
			"Cannon2A-TMk1"
		],
		"requiredResearch": [
			"R-Wpn-Cannon-Damage05",
			"R-Vehicle-Metals03",
			"R-Wpn-Cannon2Mk1"
		],
		"researchPoints": 8800,
		"researchPower": 275,
		"statID": "Cannon375mmMk1"
	},
User avatar
Doruletz
Trained
Trained
Posts: 125
Joined: 17 Sep 2015, 06:00
Location: Tennessee, USA

Re: Artillery ONLY Mod - Need help

Post by Doruletz »

Black Project wrote: 09 Apr 2025, 03:38
Doruletz wrote: 09 Apr 2025, 01:43While this prevents me from designing and producing any direct fire units, it does not impose the same restrictions for the AI player in Skirmish Games. The Bonecrusher AI comes at me with direct fire weapon units regardless.
I cannot figure out why the AI disregards the weapon specs I modify in "stats / weapons.json"
Can anybody please help me with this problem?
Thank you.
Inside "stats/research.json", try deleting the "requiredResearch" field of all researchable direct-fire weapons. Since the AI bypasses the "designable" restriction, hopefully this workaround can solve this problem by making all direct-fire weapon research topics give nothing to players, be it human or AI.

Here's an example for the Heavy Cannon

BEFORE:

Code: Select all

	"R-Wpn-Cannon3Mk1": {
		"iconID": "IMAGE_RES_WEAPONTECH",
		"id": "R-Wpn-Cannon3Mk1",
		"msgName": "RES_CN3MK1",
		"name": "Heavy Cannon",
		"redComponents": [
			"Cannon2A-TMk1"
		],
		"requiredResearch": [
			"R-Wpn-Cannon-Damage05",
			"R-Vehicle-Metals03",
			"R-Wpn-Cannon2Mk1"
		],
		"researchPoints": 8800,
		"researchPower": 275,
		"resultComponents": [
			"Cannon375mmMk1"
		],
		"statID": "Cannon375mmMk1"
	},
AFTER:

Code: Select all

	"R-Wpn-Cannon3Mk1": {
		"iconID": "IMAGE_RES_WEAPONTECH",
		"id": "R-Wpn-Cannon3Mk1",
		"msgName": "RES_CN3MK1",
		"name": "Heavy Cannon",
		"redComponents": [
			"Cannon2A-TMk1"
		],
		"requiredResearch": [
			"R-Wpn-Cannon-Damage05",
			"R-Vehicle-Metals03",
			"R-Wpn-Cannon2Mk1"
		],
		"researchPoints": 8800,
		"researchPower": 275,
		"statID": "Cannon375mmMk1"
	},
@Black Project
Thanks for your fast reply, but I don't think this will do the trick. There is a research tree, with strict requirements for previous research being completed in order to enable more advanced research. Let me try to explain...
IMHO, if AI does not research basic weapons such as MG & Cannons, they can never get to more advanced weapons, such as Mortars and Howitzers.
Same goes for mini rockets, which are needed to get to MRL, Ripple Rockets as well as Seraph and Archangel missiles.
What do I think about Window$ ??? Just see my AVATAR...
User avatar
Doruletz
Trained
Trained
Posts: 125
Joined: 17 Sep 2015, 06:00
Location: Tennessee, USA

Re: Artillery ONLY Mod - Need help

Post by Doruletz »

@Black Project

I was thinking of a different approach...
I wonder if there is a way to disable all direct fire weapon units by editing the "/multiplay/script/rules/setup/droidlimits.js"
Here is the default content for that file...

Code: Select all

function droidLimit(player)	// inside hackNetOff()
{
	setDroidLimit(player, 150, DROID_ANY);
	setDroidLimit(player, 10, DROID_COMMAND);
	setDroidLimit(player, 15, DROID_CONSTRUCT);
}
Or maybe creating a new file "/multiplay/script/rules/setup/weaponlimits.js" ???
What do I think about Window$ ??? Just see my AVATAR...
User avatar
Doruletz
Trained
Trained
Posts: 125
Joined: 17 Sep 2015, 06:00
Location: Tennessee, USA

Re: Artillery ONLY Mod - Need help

Post by Doruletz »

Doruletz wrote: 09 Apr 2025, 04:44
Black Project wrote: 09 Apr 2025, 03:38
Doruletz wrote: 09 Apr 2025, 01:43While this prevents me from designing and producing any direct fire units, it does not impose the same restrictions for the AI player in Skirmish Games. The Bonecrusher AI comes at me with direct fire weapon units regardless.
I cannot figure out why the AI disregards the weapon specs I modify in "stats / weapons.json"
Can anybody please help me with this problem?
Thank you.
Inside "stats/research.json", try deleting the "requiredResearch" field of all researchable direct-fire weapons. Since the AI bypasses the "designable" restriction, hopefully this workaround can solve this problem by making all direct-fire weapon research topics give nothing to players, be it human or AI.

Here's an example for the Heavy Cannon

BEFORE:

Code: Select all

	"R-Wpn-Cannon3Mk1": {
		"iconID": "IMAGE_RES_WEAPONTECH",
		"id": "R-Wpn-Cannon3Mk1",
		"msgName": "RES_CN3MK1",
		"name": "Heavy Cannon",
		"redComponents": [
			"Cannon2A-TMk1"
		],
		"requiredResearch": [
			"R-Wpn-Cannon-Damage05",
			"R-Vehicle-Metals03",
			"R-Wpn-Cannon2Mk1"
		],
		"researchPoints": 8800,
		"researchPower": 275,
		"resultComponents": [
			"Cannon375mmMk1"
		],
		"statID": "Cannon375mmMk1"
	},
AFTER:

Code: Select all

	"R-Wpn-Cannon3Mk1": {
		"iconID": "IMAGE_RES_WEAPONTECH",
		"id": "R-Wpn-Cannon3Mk1",
		"msgName": "RES_CN3MK1",
		"name": "Heavy Cannon",
		"redComponents": [
			"Cannon2A-TMk1"
		],
		"requiredResearch": [
			"R-Wpn-Cannon-Damage05",
			"R-Vehicle-Metals03",
			"R-Wpn-Cannon2Mk1"
		],
		"researchPoints": 8800,
		"researchPower": 275,
		"statID": "Cannon375mmMk1"
	},
@Black Project
Thanks for your fast reply, but I don't think this will do the trick. There is a research tree, with strict requirements for previous research being completed in order to enable more advanced research. Let me try to explain...
IMHO, if AI does not research basic weapons such as MG & Cannons, they can never get to more advanced weapons, such as Mortars and Howitzers.
Same goes for mini rockets, which are needed to get to MRL, Ripple Rockets as well as Seraph and Archangel missiles.

Sorry for the misunderstanding, but the way you explained, it was easy to miss. So this method does not in any way affect the required research tree / pattern, but voids the result, namely you do the research, but get no usable weapon as a result...
I will try it, and get back to you with an update.
Thanks.
What do I think about Window$ ??? Just see my AVATAR...
User avatar
Doruletz
Trained
Trained
Posts: 125
Joined: 17 Sep 2015, 06:00
Location: Tennessee, USA

Re: Artillery ONLY Mod - Need help

Post by Doruletz »

@Black Project

I tried your suggestion, but IT DID NOT WORK

After launching the game, I'm getting the following error messages in the WZlog file:

Code: Select all

error   |23:27:05: [enableResearch:2715] No such research R-Sys-Sensor-Turret01 for player 0
error   |23:27:05: [enableResearch:2715] No such research R-Wpn-MG1Mk1 for player 0
error   |23:27:05: [enableResearch:2715] No such research R-Sys-Engineering01 for player 0
error   |23:27:05: [completeResearch:2659] No such research R-Vehicle-Prop-Wheels for player 0
error   |23:27:05: [completeResearch:2659] No such research R-Sys-Spade1Mk1 for player 0
error   |23:27:05: [completeResearch:2659] No such research R-Vehicle-Body01 for player 0
error   |23:27:05: [enableResearch:2715] No such research R-Sys-Sensor-Turret01 for player 1
error   |23:27:05: [enableResearch:2715] No such research R-Wpn-MG1Mk1 for player 1
error   |23:27:05: [enableResearch:2715] No such research R-Sys-Engineering01 for player 1
error   |23:27:05: [completeResearch:2659] No such research R-Vehicle-Prop-Wheels for player 1
error   |23:27:05: [completeResearch:2659] No such research R-Sys-Spade1Mk1 for player 1
error   |23:27:05: [completeResearch:2659] No such research R-Vehicle-Body01 for player 1
The errors above make both Droid Manufacture (making any units, including more Trucks) as well as Research of any kind unavailable to the player. I can only build base structures, and that is all I can do.
Also the AI player (Bonecrusher in this case) does not even move, does not proceed to any gameplay, does not build anything at all...
What do I think about Window$ ??? Just see my AVATAR...