1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[R&F] Questions and Problems

Discussion in 'Mod Creation Help' started by Makarya, Aug 2, 2018.

  1. Makarya

    Makarya Chieftain

    Joined:
    Jul 25, 2018
    Messages:
    21
    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.

    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: Aug 2, 2018
  2. S1AL

    S1AL Warlord

    Joined:
    Jun 17, 2018
    Messages:
    134
    Gender:
    Male
    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.
     
  3. LeeS

    LeeS Imperator

    Joined:
    Jul 23, 2013
    Messages:
    6,603
    Location:
    Illinois, USA
    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.
     

Share This Page