Jump to content

List of values you can modify by technologies, buildingai blocking capture ability


Friedrich123
 Share

Recommended Posts

Hello,


So I wanted to make an own mod for 0ad, focussing on balancing and palying around with some ideas.
I ran into a problem trying to modify the "UnitMotion/Acceleration" of a unit using the { "value": "UnitMotion/Acceleration", "multiply": 1.25 } in a technology I added, as it didnt change the value of the unit. But the same tech was possible to modify the UnitMotion/WalkSpeed and Attack/Ranged/PrepareTime. So I wonder if there are values that cant be changed with the "modifications" tool or if I just made a mistake.

{
	"genericName": "Steppe Tactics",
	"description": "High manouverability and more practical bows are essential for cavalry archer combat.",
	"cost": {"food": 150,"wood": 200,"metal": 200},
	"requirements": { "tech": "phase_town" },
	"requirementsTooltip": "Unlocked in Town Phase.",
	"icon": "recurved_bow.png",
	"researchTime": 10,
	"autoResearch": false,
	"tooltip": "Cavalry archer acceleration +25% and -30% prepare time.",
	"modifications": [
		{ "value": "UnitMotion/Acceleration", "multiply": 1.25 },
		{ "value": "UnitMotion/WalkSpeed", "multiply": 1.2 },
		{ "value": "Attack/Ranged/PrepareTime", "multiply": 0.70 }
	],
	"affects": ["Cavalry Archer"],
	"soundComplete": "interface/alarm/alarm_upgradearmory.xml"
}

 

 

Another thing I had a problem with is the buildingai. I wanted to make chariots shoot while moving, so I applied the same method used in the siege tower and just set the base arrows to 1. Now the problem is: The modified chariots cant capture buildings, as they have the building flag. Is there another way to implement the same change? I either thought about making an exception for chariots blocking the buildingai or making a bypass at the flag that disallows dealing dmg and moving, although I dont know where Id find that.

 

<?xml version="1.0" encoding="utf-8"?>
<Entity parent="template_unit_champion_cavalry_archer">
  <Attack>
    <Ranged>
      <AttackName>Bow</AttackName>
      <Damage>
        <Pierce op="add">-5</Pierce>
      </Damage>
      <MaxRange op="add">-10</MaxRange>
      <PrepareTime>800</PrepareTime>
      <RepeatTime op="add">250</RepeatTime>
      <PreferredClasses datatype="tokens">Human</PreferredClasses>
    </Ranged>
  </Attack>  
  <BuildingAI>
    <DefaultArrowCount>1</DefaultArrowCount>
    <GarrisonArrowMultiplier>1</GarrisonArrowMultiplier>
    <MaxArrowCount>10</MaxArrowCount>
    <GarrisonArrowClasses>Infantry</GarrisonArrowClasses>
  </BuildingAI>
  <Footprint replace="">
    <Square width="8.0" depth="11.0"/>
    <Height>6.0</Height>
  </Footprint>
  <Identity>
    <Civ>maur</Civ>
    <GenericName>War Chariot</GenericName>
    <SpecificName>Rath</SpecificName>
    <SelectionGroupName>units/maur/champion_chariot</SelectionGroupName>
    <VisibleClasses datatype="tokens">Chariot</VisibleClasses>
    <Icon>units/maur_champion_chariot.png</Icon>
    <RequiredTechnology>unlock_champion_chariots</RequiredTechnology>
  </Identity>
  <VisualActor>
    <Actor>units/mauryas/chariot_archer_c_m.xml</Actor>
  </VisualActor>
</Entity>


Thx for replies in advance
 

Link to comment
Share on other sites

10 minutes ago, Friedrich123 said:

e. So I wonder if there are values that cant be changed with the "modifications" tool or if I just made a mistake.

See https://gitea.wildfiregames.com/0ad/0ad/wiki/TechModifications for a somewhat up to date list of all things that can be modified via tech. Unitmotion stuff is C++ so sadly you won't easily be able to override the values with techs. (Other than the two in that list)

18 minutes ago, Friedrich123 said:

Another thing I had a problem with is the buildingai. I wanted to make chariots shoot while moving, so I applied the same method used in the siege tower and just set the base arrows to 1. Now the problem is: The modified chariots cant capture buildings, as they have the building flag. Is there another way to implement the same change? I either thought about making an exception for chariots blocking the buildingai or making a bypass at the flag that disallows dealing dmg and moving, although I dont know where Id find that.

You should use turrets for this instead of making the chariot use building AI. The feature while integrated in the game is not completely finished though, so expect bugs/issues

@Freagarach implemented it in https://code.wildfiregames.com/D1958

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