Results 1 to 11 of 11

Thread: Modding Traits

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Gpower's Avatar Semisalis
    Join Date
    Apr 2010
    Location
    Australia
    Posts
    436

    Default Modding Traits

    Hi

    I have been playing around with the traits recently, changing some numbers and adding new triggers. One trigger I found myself using a lot of the "WhenToTest CharacterTurnEnd" trigger. While it's pretty handy, I'm starting to worry about if it may increase turn lag if I overuse it. I mean, it'll have to run for every character on the map every turn. So I ask you expert - do using this multiple times significantly increase turn lag?

  2. #2

    Default Re: Modding Traits

    The difference isn't noticeable so don't worry.

  3. #3
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Modding Traits

    Yes it has a significant impact. Use events, conditions and multiple triggers to minimise it.

    CTE, even if used only for the local faction, is to the player 'the AI turns'. Reducing the time those take to pass is desirable.

  4. #4
    Gpower's Avatar Semisalis
    Join Date
    Apr 2010
    Location
    Australia
    Posts
    436

    Default Re: Modding Traits

    Thanks for answering.

    Because of the two different opinions on this issue I have received, I've decide to test it out myself.

    I've designed an experiment to test the amount of lag time CharacterTurnEnd would add:
    - Done in SS6.3, with BGR activated and Gracul AI
    - I started a new campaign as Norway, early era
    - Timed the AI's total time taken for 10 turns, with no pause in between (When it's my turn I immediately end, half a second delay max)
    - Add 30 triggers using the following code:
    " Trigger Lag_Test_1
    WhenToTest CharacterTurnEnd

    Condition IsGeneral
    and FactionBuildingExist = roads
    and FactionBuildingExist = farms
    and FactionBuildingExist = corn_exchange

    Affects SpyMaster 1 Chance 1"
    - Start another game as Norway and repeat test.


    Results
    - 1st time (no lag_test triggers): 7:21 mins
    - 2nd time (with lag_test triggers): 6:59 mins

    Amazing how the one with the extra 30 triggers actually finished faster - this shows that the effect is small enough that other random factors effectively negates it.

    However, during the test I've ran into a strange problem. Originally the test trigger says "Affect SpyMaster 1 Chance 100", and I keep on getting CTDs. However after I changed the 100 to 1 I did not have this problem. Do anyone have any ideas what this is caused by, and will I be likely to run into this problem again?

  5. #5

    Icon1 Re: Modding Traits

    Gpower: Try ‘FactionBuildingExists’ that should stop it from CTD.
    However, during the test I've ran into a strange problem. Originally the test trigger says "Affect SpyMaster 1 Chance 100", and I keep on getting CTDs. However after I changed the 100 to 1 I did not have this problem. Do anyone have any ideas what this is caused by, and will I be likely to run into this problem again?
    The chances of acquiring the trait were only 1%, so nobody actually got it.
    Last edited by TNZ; November 16, 2010 at 05:21 AM. Reason: Supplementary

  6. #6
    Gpower's Avatar Semisalis
    Join Date
    Apr 2010
    Location
    Australia
    Posts
    436

    Default Re: Modding Traits

    Quote Originally Posted by TNZ View Post
    Gpower: Try ‘FactionBuildingExists’ that should stop it from CTD.

    The chances of acquiring the trait were only 1%, so nobody actually got it.
    Yeah, sorry about the typo, I've checked and hadn't make that typo on the files. The strange thing is, although all the traits are identical, when I put it on 100% the CTD don't occur immediately, instead it crash after the trigger repeated itself for 20+ times.

    Quote Originally Posted by Taiji View Post
    The fact your test shows a difference in time unexplained by the changes made in the test shows that the test was not adequate to show anything conclusively. But if you're not going to concern yourself with the efficiency of all systems then you might be wasting your time doing it for one. There are probably larger gains to be made elsewhere, 7 mins is a lot more time compared with my work. But perhaps the difference in our PCs explains that difference, and so it's not simply down to it being less efficient work.
    Maybe, but now I though about it, I think it's more likely that it's BGR submod that is really laging my computer down. I probably should have disabled it before the test. Anyway, if I get time I might redo it. I think it's safe to say that the effects are not huge for me at least though, seeing I'm used to the long waits I get for using BGR .
    Last edited by Gpower; November 16, 2010 at 05:36 AM.

  7. #7
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: Modding Traits

    Quote Originally Posted by Gpower View Post
    Yeah, sorry about the typo, I've checked and hadn't make that typo on the files. The strange thing is, although all the traits are identical, when I put it on 100% the CTD don't occur immediately, instead it crash after the trigger repeated itself for 20+ times.
    Click the tools link in my sig and grab ATVTW it checks many bugs related to traits and ancillaries. The CTD is likely caused by putting too many points a particular attribute.

    Quote Originally Posted by Taiji View Post
    Yes it has a significant impact. Use events, conditions and multiple triggers to minimise it.
    I'd disagree with this, having played with a couple of mods that use a lot of traits/ancillary triggers it is not these triggers that slow the game down but any associated scripts the mods are running. Take EB and remove its script (i.e. so there's no background script) and run it with their regular EDCT/EDA triggers and then again with all triggers commented out. There is no noticeable difference in end of turn processing and I can't think of any mod that has more triggers in their EDCT/EDA files.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  8. #8
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Modding Traits

    The fact your test shows a difference in time unexplained by the changes made in the test shows that the test was not adequate to show anything conclusively. But if you're not going to concern yourself with the efficiency of all systems then you might be wasting your time doing it for one. There are probably larger gains to be made elsewhere, 7 mins is a lot more time compared with my work. But perhaps the difference in our PCs explains that difference, or perhaps some slow features have been added to SS and fans don't mind the wait, and so then it would not simply be down to it being somehow less efficient work.
    Last edited by Taiji; November 16, 2010 at 05:30 AM.

  9. #9
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Modding Traits

    Well that's a bit odd to me, from what I can remember I think Byg's trait stuff only applies for the player. Strange but anyway, I totally agree, it's not going to have a huge impact, unless you're adding hundreds of triggers that fire each turn, if the system is already taking 7 mins to process a turn. Funny how that slower turn time gives you some more flexibility...
    Last edited by Taiji; November 16, 2010 at 05:43 AM.

  10. #10

    Icon1 Re: Modding Traits

    Taiji: I think the seven minutes was for ten turns, which would be about 42 seconds a turn.

  11. #11
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: Modding Traits

    Oh... Silly me not reading the whole post. That sounds much more reasonable. I'm glad you explained it for me, TNZ, because I was thinking about posting some suggestions for improving it ...
    Last edited by Taiji; November 16, 2010 at 07:46 AM.

Posting Permissions

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