[R&F] Questions and Problems

Makarya

Chieftain
Joined
Jul 25, 2018
Messages
23
Hello, i'm going to make use one post to post all my question, it will be easier to follow.

I'm creating a mod to tweak the naval combat a bit.

I give the naval raider a malus against land unit and district. No problem to give it (only when attacking) but it's not perfect
First problem: preview in combat recapitulary. When hovering for an attack the malus is taken into the final strength but the small message for this modificator is absent.
For a moment it was there, but it dissapeared when i change nothing, i do not know what. There is no error in database.log.

I thought it was managed by:
<ModifierStrings>
<Row ModifierId="NAVAL_RAIDER_LAND_MALUS" Context="Preview" Text="LOC_ABILITY_WEAK_AGAINST_LAND_PREVIEW"/>
<Row ModifierId="NAVAL_RAIDER_DISTRICT_MALUS" Context="Preview" Text="LOC_ABILITY_NAVAL_RAIDER_WEAK_ATTACK_AGAINST_DISTRICT_PREVIEW"/>
<Row ModifierId="NAVAL_RAIDER_NAVAL_RANGED_MALUS" Context="Preview" Text="LOC_AABILITY_NAVAL_RANGED_WEAK_ATTACK_AGAINST_NAVAL_RAIDER_PREVIEW"/>
</ModifierStrings>

Second problem: the malus is against embarked opponent and i would like to change that. I tried to copy from the Preparatory fire promotion but i didn't see anything about embarked unit.

Edit: Bonus question. If i wanted to remove the coastal raid from submarine, am i obliged to pass by sql?



The mod: https://1drv.ms/u/s!AjzvkOieRFT54C3eNkJ4sbdGICVz
 
Last edited:
I believe the issue is that you changed the name from "LOC_ABILITY_WEAK_AGAINST_LAND_DESCRIPTION" (in UnitAbilities) to "LOC_ABILITY_WEAK_AGAINST_LAND_PREVIEW" (in ModifierStrings).

As far as the embarked units issue goes, I don't see a way to check against either the defender's terrain or embarkation status. I'll dig around some more later.
 
Edit: Bonus question. If i wanted to remove the coastal raid from submarine, am i obliged to pass by sql?
The only time you must use SQL instead of XML is when you are attempting a database operation that XML does not support. SQL for example can copy data from an existing Row and create a new Row in a table, whereas XML cannot. You can <Update> or <Delete> an existing Row in a table using XML, and you can <Delete> multiple rows in a table with XML but sometimes doing a multiple-row delete (whether by XML or SQL) deletes more than was intended so you have to be careful about your specification of what to delete from a given table.
 
Back
Top Bottom