Jump to content

panther42

Community Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by panther42

  1. @wowgetoffyourcellphone FYI if not already known or intended design.

    If trying to build wall as Carthaginians:

    delenda_est_cart_wall.png.4ff305a0cb535567da5c18facb582bc1.png

    Will get the following errors:

    Spoiler

    ERROR: [SetWallPlacementPreview] No WallPiece component found for wall set template 'structures/cart_wall_gate'
    ERROR: [SetWallPlacementPreview] No WallPiece component found for wall set template 'structures/cart_wall_long'
    ERROR: [SetWallPlacementPreview] No WallPiece component found for wall set template 'structures/cart_wall_medium'
    ERROR: [SetWallPlacementPreview] No WallPiece component found for wall set template 'structures/cart_wall_short'

     

    • Like 1
  2. thanks @stanislas69, but I do not want to bother these persons to teach me something, which I can read tutorials and the game code to try and figure out.  I'm sure they have plenty to do.

    I did find a gameplay item I wanted to point out to @wowgetoffyourcellphone.  Defensive Towers.

    Unless I've missed something, here is my deduction of the implementation in Delenda.

    Defensive towers as defined in template_structure_defense_defense_tower.xml have MaxArrowCount of 3:

    Spoiler
    
    <BuildingAI>
        <DefaultArrowCount>1</DefaultArrowCount>
        <GarrisonArrowMultiplier>1</GarrisonArrowMultiplier>
        <MaxArrowCount>3</MaxArrowCount>
    	<GarrisonArrowClasses>Infantry+Ranged</GarrisonArrowClasses>
      </BuildingAI>

     

    Via tech upgrades(pair_tower_01), you can choose Sentries, "Defense Towers +2 default arrows, but now each tower costs 1 population.", or Crenellations, "Defense Towers +50% more arrows fired per garrisoned soldier."

    Crenellations do not work as intended, due to the MaxArowCount.

    Here is tech upgrade affects:

    "modifications": [{"value": "BuildingAI/GarrisonArrowMultiplier", "multiply": 1.5}]

    But here is the game function which applies the number of arrows in BuildingAI.js:

    Spoiler
    
    /**
     * Returns the number of arrows which needs to be fired.
     * DefaultArrowCount + Garrisoned Archers(ie., any unit capable
     * of shooting arrows from inside buildings)
     */
    BuildingAI.prototype.GetArrowCount = function()
    {
    	let count = this.GetDefaultArrowCount() +
    		Math.round(this.archersGarrisoned * this.GetGarrisonArrowMultiplier());
    
    	return Math.min(count, this.GetMaxArrowCount());
    };

     

    As you can see, it uses the Math.min between the count(see code), and the MaxArrowCount.

    Using examples above, GetDefaultArrowCount(1) + (archersGarrisoned(let's use 5) * GarrisonArrowMultiplier(1.5 for Crenellations)) = 9(rounded)

    But, you only shoot 3.

    I could put 15 archers in the defense tower(hypothetical), and could still only shoot 3 arrows.

     

    Just an observation.  I was wondering why my defense towers couldn't hold the enemy off.  This may be intended behavior for @wowgetoffyourcellphone design.

  3. the main problem, and I'm sure you're aware, is the AI.

    The AI is "hard coded" in to many instances, and mod's which stray from the basic template fail.

    Delenda has to many user input decisions, which fails with the AI.  Some are decisions you could have the AI "roll the dice", and chose based on percentage.  I.E. if Math.floor((Math.random() * 10) + 1) < 5 then...

    I watched two AI against each other, and one was Maur, which has the worker elephant.  Since the storehouse is disabled in Del for them at the beginning, the AI only had one worker elephant the entire time, and was severely limited for gathering resources...

    I come from a game which was quite similar in scripting language, but this javascript is giving me some headaches trying to figure out.

    • Like 1
  4. On 6/13/2017 at 11:36 AM, fatherbushido said:

    I got that error also in some tech in the imperial court
    ERROR: Error in timer on entity 2026, IID73, function ProgressTimeout: TypeError: mod.affects.split is not a function
      DeriveModificationsFromTech@globalscripts/Technologies.js:70:22
      TechnologyManager.prototype.ResearchTechnology@simulation/components/TechnologyManager.js:273:26
      ProductionQueue.prototype.ProgressTimeout@simulation/components/ProductionQueue.js:785:4
      Timer.prototype.OnUpdate@simulation/components/Timer.js:120:4 

    Was a fix for this error ever determined?

    I get that error on the National Industries Level 1.  It times out at 0:01 remaining, and spits out the error.

    Cannot use any of the techs in the next level, and cannot spawn the chin_champion_chariotscreenshot0001a.png.c24be71de812bf4a49cbe1246aefa1a8.png

     

    If you start from the left side, you can do the upgrades for the first three, then fails on Nationalized Industries(fourth).

    If you start from the Nationalized Industries(fourth), it will fail, and you cannot click at the top to stop it, and select any of the first three.

     

    Can you have brackets[] inside the code block?

    {"value": "Cost/BuildTime", "multiply": 0.1, "affects": ["Storehouse", "Farmstead"]}

    Compared to another example from attack_citizensoldiers_will, where multiple classes are not:

    {"value": "Attack/Melee/Hack", "multiply": 1.2, "affects": "CitizenSoldier Melee"}

  5. 4 hours ago, wowgetoffyourcellphone said:

    So mods don't have to edit identity.js to include new classes right?

    I don't believe that is what the schema entry is for... more for template on how to make a template_unit or template_structure, etc.

    Main question is, can a MOD add a Class to Classes or VisibleClasses in the game, to be used for i.e. technologies, etc.

    Questions:

    Spoiler
    1. What is the difference between Classes and VisibleClasses, particularly when used by technologies.   "affects": ["Worker"]
      • health_females_01 uses FemaleCitizen(from Classes), whereas many use Worker(from VisibleClasses)
    2. Can a MOD expand the list of either Classes or VisibleClasses to include new?
      • Example:  MOD has a SuperHero class, which inherits from template_unit_hero
      • MOD has technology for Kryptonite, which affects only SuperHero class.
      • Do not want to affect all other units which inherit from template_unit_hero
    3. What is the difference between CivCentre(Classes), and CivilCentre(VisibleClasses)?
      • CitizenSoldier(Classes) vs Citizen(VisibleClasses) + Soldier(VisibleClasses)
    4. Are there templates for Worker, Citizen, Support, etc?  Where defined?
    5. Does inheritance build off of base entity, or replace for listed Classes/VisibleClasses in child, if written
      • template_unit
        1. Classes:  Unit  ConquestCritical
        2. No VisibleClasses
      • template_unit_support
        1. Classes:  Human  Organic  (Does Unit and ConquestCritical apply to this entity)
        2. VisibleClasses:  Support
      • template_unit_support_female_citizen
        1. Classes:  FemaleCitizen  (Does Unit, ConquestCritical, Human, Organic apply to this entity)
        2. VisibleClasses:  Citizen  Worker (Does Support still apply)

    What had me thinking about this, is going through Delenda, and seeing technology affects applied to such entities as "Gatherer".  I could not find "Gatherer" in main game.

    CultStatue is another.  Does just adding it to VisibleClasses, add it to the game?  Seems to answer some of above questions, if so.

    Spoiler
    
    <Identity>
        <Civ>gaia</Civ>
        <GenericName>Cult Statue</GenericName>
        <SpecificName>Mnimeíon</SpecificName>
        <Classes datatype="tokens">-ConquestCritical</Classes>
        <VisibleClasses datatype="tokens">-City Town CultStatue</VisibleClasses>
        <Tooltip>Build these to generate the Glory resource over time. Task units to pray at the statue to generate Glory even faster. Can only build 1 at a time, one after another.</Tooltip>
        <Icon>structures/statue.png</Icon>
        <RequiredTechnology>phase_town</RequiredTechnology>
      </Identity>

     

    Is there a command to query all Classes and VisibleClasses loaded?

    • Like 1
  6. Where can you find all of the available entity classes in the game listed?

    I looked on trac.wildfiregames.com, but all links to entity documentation give a non-working page: entity documentation.

    Looking for where in the game entity is defined, such as "Worker", "Citizen Soldier", etc. for use in such things as templates.

    "affects": ["Worker"]

     

    Thank You

  7. Sorry for confusion. I messed up on the getPhaseEntityRequirements function.  It is actually line 2201 of headquarters.js:

    this.checkPhaseRequirements(gameState, queues);

    This function is in binaries/data/mods/public/simulation/ai/petra/phaseRequirements.js, which is missing

  8. Justus, I use your MOD all of the time.  I would be willing to help you out with bugs.  I have found a couple in the recent github updates you have posted.

    I use the latest SVN to play your MOD.

    In theb_mechanical_siege_oxbeles_packed.xml you use

    <Pack>
        <Entity>units/atheb_mechanical_siege_oxybeles_unpacked</Entity>
        <Time>10000</Time>
        <State>packed</State>
      </Pack>

    this should be "theb", not "atheb"

    Also, in mainmenu.xml:

    <objects>
    	<script file="gui/common/music.js"/>
    	<script file="gui/common/functions_global_object.js"/>
    	<script file="gui/common/functions_utility_error.js"/>
    	<script file="gui/pregame/mainmenu.js"/>
    	<script directory="gui/pregame/backgrounds/"/>

    "gui/common/functions_utility_error.js" was removed in 19781.

     

    AI fails because it is missing the function for gameState.getPhaseEntityRequirements(this.phasing).length) in binaries/data/mods/public/simulation/ai/petra/headquarters.js.  This is a separate file under binaries/data/mods/public/simulation/ai/petra/phaseRequirements.js listed in D654

    This file is missing.

     

    This is from github 6/20/17 files.

    • Like 1
×
×
  • Create New...