Jump to content

Syracuse Mod Idea/Brainstorming


 Share

Recommended Posts

Just now, PyrrhicVictoryGuy said:

I divised some plans for the unique build : "Fortified Port", now only need a sketch. Its not perfect but I think it can help to visualize the proportions. It's to ocupy roughly the same area a military colony.1012866036_CapturadeEcr(138).thumb.png.18ab958d587ac2364fcfa07799a0fd22.png 

Damm, I'm so illiterate, can't even spell roof tiles right...

  • Like 1
Link to comment
Share on other sites

2 hours ago, PyrrhicVictoryGuy said:

I divised some plans for the unique build : "Fortified Port", now only need a sketch. Its not perfect but I think it can help to visualize the proportions. It's to ocupy roughly the same area a military colony.1012866036_CapturadeEcr(138).thumb.png.18ab958d587ac2364fcfa07799a0fd22.png 

Enough for a start, tomorrow I'll have some free time, I'll do it on top of Spartan structures.:thumbsup:

  • Thanks 1
Link to comment
Share on other sites

I think this should be and additional upgrade for the p1 tower, either you upgrade to the p2 tower we already have or you upgrade it to the " Mirror Tower", it would have to be more expensive  than the normal p2 tower upgrade but enables it to affect siege machines but not regular units. I think a choice like this, between denying area to units vs denying area to siege would be interesting.

 

Edited by PyrrhicVictoryGuy
  • Like 2
Link to comment
Share on other sites

On 24/06/2021 at 2:23 PM, PyrrhicVictoryGuy said:

Can't we have a tech that trains a fixed batch of x troops? I say a tech because it would only be used once.

I had some time to code a patch for this this weekend. All it took were a few tweaks to TechnologyManager.js and ProductionQueue.js:  tech_triggers.zip

With this patch you can add "triggers" to each technology.json. I added @wowgetoffyourcellphone's Epigamia tech as an example:

{
	"genericName": "Marriage Pact",
	"specificName": {
		"sele": "Epigamia"
	},
	"description": "Form a marriage pact with the Maurya Empire. Receive a one-time gift of 20 War Elephants, in exchange for reduced territory push for Civil Centers.",
	"cost": {
		"metal": 600
	},
	"requirements": {
		"all": [
			{ "tech": "phase_city" },
			{ "civ": "sele" },
			{
				"entity": {
					"class": "SeleucusNikator",
					"number": 1
				}
			}
		]
	},
	"requirementsTooltip": "Unlocked in City Phase. Requires training the hero Seleucus I (Nikator).",
	"icon": "sibylline_books.png",
	"researchTime": 40,
	"tooltip": "Receive a one-time gift of 20 Maurya War Elephants, in exchange for reduced territory push for Civil Centers.",
	"modifications": [
		{ "value": "TerritoryInfluence/Radius", "multiply": 0.7, "affects": "CivCentre" }
	],
	"triggers": [{
		"systemComponent": "Trigger",
		"func": "TechSpawnUnits",
		"args": [{
			"researcher": "{{ researcher }}",
			"player": "{{ playerID }}",
			"unitTemplate": "units/maur/champion_elephant",
			"count": 20
		}]
	}],
	"soundComplete": "interface/alarm/alarm_upgradearmory.xml"
}

There are three elements to each trigger:

  1. The component name. A component is basically one of the elements in a template like "ProductionQueue" or "Health". There are three types of components you can use: entityComponents, playerComponents, and systemComponents. Entity components are components of the structure or unit that researched the tech, player components are components contained in player.xml, and system components are global, gamewide components like Triggers. This particular example uses a custom-written trigger function in Triggers~tech_triggers.js.
  2. The function name ("func"). The available functions for each component are in simulation/components/<Component>.js.
  3. The args: an array of args to feed to the function. Certain properties can be parsed into the args if they are contained between double brackets, like {{ playerID }}. Currently, researcher (the entity that researched the tech) and playerID are the only properties that can be parsed like this.

You can make your tech spawn any units you want by replacing the value of unitTemplate in the example above.

I'll try to submit this for A26. You can add the code directly to your mod as well, but I can understand not wanting to maintain a lot of js code in a faction-based mod like this. In the meantime I'm going to add it to Mare Nostrum, if you want to play around with it there.

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

On 06/07/2021 at 2:05 AM, hopeless-ponderer said:

I had some time to code a patch for this this weekend. All it took were a few tweaks to TechnologyManager.js and ProductionQueue.js:  tech_triggers.zip

With this patch you can add "triggers" to each technology.json. I added @wowgetoffyourcellphone's Epigamia tech as an example:

{
	"genericName": "Marriage Pact",
	"specificName": {
		"sele": "Epigamia"
	},
	"description": "Form a marriage pact with the Maurya Empire. Receive a one-time gift of 20 War Elephants, in exchange for reduced territory push for Civil Centers.",
	"cost": {
		"metal": 600
	},
	"requirements": {
		"all": [
			{ "tech": "phase_city" },
			{ "civ": "sele" },
			{
				"entity": {
					"class": "SeleucusNikator",
					"number": 1
				}
			}
		]
	},
	"requirementsTooltip": "Unlocked in City Phase. Requires training the hero Seleucus I (Nikator).",
	"icon": "sibylline_books.png",
	"researchTime": 40,
	"tooltip": "Receive a one-time gift of 20 Maurya War Elephants, in exchange for reduced territory push for Civil Centers.",
	"modifications": [
		{ "value": "TerritoryInfluence/Radius", "multiply": 0.7, "affects": "CivCentre" }
	],
	"triggers": [{
		"systemComponent": "Trigger",
		"func": "TechSpawnUnits",
		"args": [{
			"researcher": "{{ researcher }}",
			"player": "{{ playerID }}",
			"unitTemplate": "units/maur/champion_elephant",
			"count": 20
		}]
	}],
	"soundComplete": "interface/alarm/alarm_upgradearmory.xml"
}

There are three elements to each trigger:

  1. The component name. A component is basically one of the elements in a template like "ProductionQueue" or "Health". There are three types of components you can use: entityComponents, playerComponents, and systemComponents. Entity components are components of the structure or unit that researched the tech, player components are components contained in player.xml, and system components are global, gamewide components like Triggers. This particular example uses a custom-written trigger function in Triggers~tech_triggers.js.
  2. The function name ("func"). The available functions for each component are in simulation/components/<Component>.js.
  3. The args: an array of args to feed to the function. Certain properties can be parsed into the args if they are contained between double brackets, like {{ playerID }}. Currently, researcher (the entity that researched the tech) and playerID are the only properties that can be parsed like this.

You can make your tech spawn any units you want by replacing the value of unitTemplate in the example above.

I'll try to submit this for A26. You can add the code directly to your mod as well, but I can understand not wanting to maintain a lot of js code in a faction-based mod like this. In the meantime I'm going to add it to Mare Nostrum, if you want to play around with it there.

You're brilliant  mate!!

hoplite.thumb.png.0a8fef6a4a19ae5eb936e25821d1636a.png

 

Would it be possible to make the hoplite unit something like this?

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...