Jump to content

Tried to add the inexisting template units/imp_support_female_citizen to Petra


wowgetoffyourcellphone
 Share

Recommended Posts

WARNING: PlayerID 2 | Tried to add the inexisting template units/imp_support_female_citizen to Petra. Please report this on the forums

WARNING: PlayerID 2 | Plan training units/imp_support_female_citizen canceled

WARNING: JavaScript warning: simulation/ai/petra/queueplan--.js line 56 reference to undefined property this.cost

ERROR: JavaScript error: simulation/ai/common-api/resources.js line 32 TypeError: that is undefined m.Resources.prototype.add@simulation/ai/common-api/resources.js:32:3 m.QueuePlan.prototype.getCost@simulation/ai/petra/queueplan--.js:56:2 m.Queue.prototype.maxAccountWanted@simulation/ai/petra/queue.js:73:3 m.QueueManager.prototype.distributeResources@simulation/ai/petra/queueManager.js:316:8 m.QueueManager.prototype.update@simulation/ai/petra/queueManager.js:446:2 m.PetraBot.prototype.OnUpdate@simulation/ai/petra/_petrabot.js:125:3 m.BaseAI.prototype.HandleMessage@simulation/ai/common-api/baseAI.js:81:2

I think the AI randomly got assigned to Romans (Principates) and that civ does not have a female citizen. I this will pop up in other mod as well in the future.

Maybe Petra can parse gather rates and assign unit according to these instead of by template? Is that hard? I don't know this. Or maybe look for template classes (we can add 'ai cheater' classes to the non-visible classes to help the ai out). So, instead of look for {civ}_female_citizen, look for classes: citizen gatherer farmer. Last one is class for ai to know to prefer this units for farming. Ai can look for classes "gatherer forager" to select units to go pick berry. I add this ideas for ai's planning. I know the original warning is a different problem.

Edited by wowgetoffyourcellphone
Link to comment
Share on other sites

Yes, the ai should scan available templates to make its choice based on the gatherRate-cost stats. Not too difficult to implement as there is already something analoguous done for the choice of fighting units based on their strength-cost. Something to implement for a20.

In the meantime, i can put another default when no female template is found. Do you have a replacement template in your mod ? or are your only relying on CitizenSoldier for economics ?

Link to comment
Share on other sites

In the meantime, i can put another default when no female template is found. Do you have a replacement template in your mod ? or are your only relying on CitizenSoldier for economics ?

Principate Romans use imp_support_citizen (traine at Civic Center) and imp_support_slave_female (trained at Farmstead, good for food gather and die after a 5 mins) and imp_support_slave_male (trained at storehousew, good for mining and die after 5 mins). Most analogous to female_citizen is the citizen, since he trained from Civic center and available at start of match. "CitizenSoldiers" for this civ like Roman Legionaires can only build buildings.

I don't expect much support for mod right now though consider game still evolving. I just report this warning because it tell me to. haha ;) I know mod support not top priority. (y)

Edited by wowgetoffyourcellphone
  • Like 1
Link to comment
Share on other sites

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...