Results 1 to 10 of 10

Thread: (Question) How do you change agent's movement range?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default (Question) How do you change agent's movement range?

    I have tried to figure out how to change faction-wide agent movement range but I seem to be stuck.

    I have tried editing the following tables:

    agents_tables - I changed the move_points values in this table, seemed to do nothing.

    campaign_difficulty_handicap_effects
    - I tried adding rows for each difficulty with the rom_agent_movement_range_mod using this_faction, all_agents, and this_agent. I tried multiple values: -2000, -10000, 0.5. Nothing worked.


    Anyone have any ideas?

  2. #2
    alhoon's Avatar Comes Rei Militaris
    Join Date
    Apr 2008
    Location
    Chania, Greece
    Posts
    24,223

    Default Re: (Question) How do you change agent's movement range?

    I changed the agent_tables and it worked perfectly. Are you sure your mod is not a victim of the weird bug of patch 3? There's a bug that prevents some parts of mods to load and CA told us that it will be fixed in patch 5 (not 4). Daniu made a tool to address it.
    alhoon is not a member of the infamous Hoons: a (fictional) nazi-sympathizer KKK clan. Of course, no Hoon would openly admit affiliation to the uninitiated.
    "Angry Uncle Gordon" describes me well.
    _______________________________________________________
    Beta-tester for Darthmod Empire, the default modification for Empire Total War that does not ask for your money behind patreon.
    Developer of Causa Belli submod for Darthmod, headed by Hammeredalways and a ton of other people.
    Developer of LtC: Random maps submod for Lands to Conquer (that brings a multitude of random maps and other features).

  3. #3

    Default Re: (Question) How do you change agent's movement range?

    Thank you for responding alhooh. You could very well be right. I have made a new mod, opened old mods and edited them, etc. and the changes don't seem to have any effect.

    I can't figure it out. My other mods work fine, I even added these changes to a mod that works and it hasn't changed agent movement. For example, I used one of my 2tpy mods and added agent movement changes. Everything else worked (build times, research times), but the agent part didn't.

    I am a newbie when it comes to modding so I must be missing something, or the bug is very strange.
    Last edited by Dresden; October 09, 2013 at 10:57 PM.

  4. #4
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Re: (Question) How do you change agent's movement range?

    Until patch 5, I'm using movie packs for any small scale testing (such as just changing movement) so that I know its being loaded. Not ideal, but neither are type 5 packs.

    Once I know its working, I then add it to a more compiled mod which is mod type. If that doesn't load, I then know it's because of the loading bug and I can change it to a type 5.

    Can't wait for patch 5 so this little annoyance can be lost forever.
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

  5. #5

    Default Re: (Question) How do you change agent's movement range?

    I am using movie packs to test this change, and it isn't working. That is what is so confusing. I can't seem to change the agent movement using the agents table. I am even adding the changes to mods that are working and the changes won't work. I am currently stumped, going to call it a night.

    Edit: After a couple of beers, I realized I wasn't testing out newly made agents. The changes only work on agents who aren't present at the start of a campaign or save game. Doh!
    Last edited by Dresden; October 10, 2013 at 12:35 AM.

  6. #6

    Default Re: (Question) How do you change agent's movement range?

    Quote Originally Posted by Dresden View Post
    After a couple of beers, I realized I wasn't testing out newly made agents. The changes only work on agents who aren't present at the start of a campaign or save game. Doh!
    That is very relevant and very, very bad news.
    It means that when changing a value in the DB files, you'll also have to edit startpos.esf in all places where the changed values have already been applied.
    A nightmare for mod compatability.

    It would be interested to check if that is also the case for unit values (although those are less relevant because the starting units don't really last that long).
    Tools: PFM 4.1 - EditSF 1.2.0
    (Download PFM - Download EditSF)
    Warscape Modding Guide
    Join the PFM User Group on Steam to receive PackFileManager update notifications.

    Respecto Patronum

  7. #7
    alhoon's Avatar Comes Rei Militaris
    Join Date
    Apr 2008
    Location
    Chania, Greece
    Posts
    24,223

    Default Re: (Question) How do you change agent's movement range?

    Quote Originally Posted by daniu View Post
    That is very relevant and very, very bad news.
    It means that when changing a value in the DB files, you'll also have to edit startpos.esf in all places where the changed values have already been applied.
    A nightmare for mod compatability.
    It would be interested to check if that is also the case for unit values (although those are less relevant because the starting units don't really last that long).
    It was the same in ETW. The movement etc of agents present had to be edited from the startpos. HOWEVER it's not that terrible a problem. Yes, your very first spy would move slowly. All the other agents you'll make will move normally. Unit stats (not number of people IIRC) change with changes in the DB.

    That the movement had to be saved isn't that weird IMO. Remember saves are fully functional esfs. If the movement points of agents weren't saved in the esf, then each time you loaded, your agents would have maximum action points.
    Last edited by alhoon; October 11, 2013 at 02:47 AM.
    alhoon is not a member of the infamous Hoons: a (fictional) nazi-sympathizer KKK clan. Of course, no Hoon would openly admit affiliation to the uninitiated.
    "Angry Uncle Gordon" describes me well.
    _______________________________________________________
    Beta-tester for Darthmod Empire, the default modification for Empire Total War that does not ask for your money behind patreon.
    Developer of Causa Belli submod for Darthmod, headed by Hammeredalways and a ton of other people.
    Developer of LtC: Random maps submod for Lands to Conquer (that brings a multitude of random maps and other features).

  8. #8

    Default Re: (Question) How do you change agent's movement range?

    Quote Originally Posted by alhoon View Post
    it's not that terrible a problem. Yes, your very first spy would move slowly. All the other agents you'll make will move normally. Unit stats (not number of people IIRC) change with changes in the DB.
    Yeah it's not that terrible since it's temporary, but still.
    1. It makes testing mods harder a bit because you have to first recruit one of the units you changed.
    2. It's not only true for startpos, but also other saves. I.e. the answer to the frequent question "will the mod take effect in already started campaigns" is "only for newly recruited units/agents and constructed buildings".
    3. Speaking of buildings: adding a new effect to a building will probably also only be applied after constructing the building. I mention that because buildings are a bit more permanent
    (And to me it explains why I never managed to get my FotS defense mod working to have higher castle levels add defenses on the battle map)

    That the movement had to be saved isn't that weird IMO. Remember saves are fully functional esfs.
    You mean "startpos is a fully functional save game"
    Yes, that's what explains the behavior; I did know that, but did not fully grasp the ramifications yet.
    I'm just thinking them out loudly now that I'm finding out.

    If the movement points of agents weren't saved in the esf, then each time you loaded, your agents would have maximum action points.
    That is a good point.
    There are ways around that of course (values in percent or special values indicating "use value from database"), but I fully understand why CA didn't put effort into going them.
    Tools: PFM 4.1 - EditSF 1.2.0
    (Download PFM - Download EditSF)
    Warscape Modding Guide
    Join the PFM User Group on Steam to receive PackFileManager update notifications.

    Respecto Patronum

  9. #9
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Re: (Question) How do you change agent's movement range?

    Quote Originally Posted by daniu View Post
    You mean "startpos is a fully functional save game"
    Quite the surprise this was when I realised this yesterday. I was expecting some sort of script that generated all the variables involved on a new campaign (eg. CreateAgent("type", location[], optional trait[], optional skill[])), completely seperate to the saves (silly me having avoided startpos and save editing till now). Still not really sure why it isn't done that way, but I'm sure there is a reason.
    Quote Originally Posted by daniu
    There are ways around that of course (values in percent or special values indicating "use value from database"), but I fully understand why CA didn't put effort into going them.
    Storing percentages gives rise to its own issues, mostly to do with rounding and unnecesary processing. Storing absolute values in the saves makes a lot of sense, which forces the startpos to do the same because of its similarity to a save.
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

  10. #10
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Re: (Question) How do you change agent's movement range?

    That is a little unusual, as the startpos would almost have to be declaring the agent with a set amount of movement points, which sounds a little off. The agent tables should in theory be loaded in before the campaign is initialised, therefore creating the agent with the new characteristics.

    EDIT

    Blast, agents are declared fully including movement points. 6th or 7th entry (current and max I'm guessing) under Locomotable where each character is stored. What an unusual way to do it.

    Thankfully, military units only have bonus stats attributed in here. Nothing major that I can see, so this might be contained to agents (general/spy/dignitary/champion)

    EDIT2

    Regarding conflicts, its probably better to script the changes if possible (On Campaign Start: for each char in each faction, update the movement points to x value where x is the value used by the mod). Then you get the changes by mod precedence. The problem would be getting to each factions character list as it doesn't appear to be mentioned anywhere in the vanilla scripting files hence you'd be shooting in the dark for naming and location.

    If you can get to that list, making the change would be the simplest thing ever and the function would work for any mod (insert value here type of compatibility).
    Last edited by crzyrndm; October 10, 2013 at 04:56 AM.
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •