Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 54

Thread: Lesson 4 part 2 Traits and Ancillaries

  1. #21

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    Spoiler Alert, click show to read: 

    Spoiler Alert, click show to read: 
    ;------------------------------------------
    Trigger Pendragon
    WhenToTest PostBattle

    Condition WonBattle
    and BattleSuccess >= average
    and PercentageEnemyKilled < 20
    and IsGeneral
    and FactionType dyfneint

    Affects Dragon 1 Chance 50


    Spoiler Alert, click show to read: 
    ;------------------------------------------
    Trigger cestus_dei_anc_trigger
    WhenToTest GovernorBuildingCompleted
    Condition IsGeneral
    and SettlementBuildingFinished = cathedral

    AcquireAncillary cestus_dei chance 10
    Hr. Alf han hugg til han var mod, Han sto i femten Ridderes Blod; Så tog han alle de Kogger ni Og sejlede dermed til Norge fri. Og der kom tidende til Rostock ind, Der blegned saa mangen Rosenkind. Der græd Enker og der græd Børn, Dem hadde gjort fattig den skadelige Ørn.
    Anders Sørensen Vedel

  2. #22

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    So here is my creation
    Traits Hates Danelags
    Spoiler Alert, click show to read: 

    Ancillaries Thor hammer
    Spoiler Alert, click show to read: 

    Traits triggers
    Code:
    ;------------------------------------------
    Trigger dad_FearsDanelags
        WhenToTest CharacterComesOfAge
    
        Condition FatherTrait Fearsdanelags >= 1
    
        Affects Hatesdanelags  1  Chance  50
    Anti-traits
    Code:
    ;------------------------------------------
    Trigger dad_hatesDanelags
        WhenToTest CharacterComesOfAge
    
        Condition FatherTrait Hatesdanelags >= 1
    
        Affects Hatesdanelags  1  Chance  50
    Ancillaries Thor hammer
    Code:
    ;------------------------------------------
    Ancillary thor_hammer
        Type Relic
        Transferable  1 
        Image thor_Hammer.tga
        ExcludeCultures mesoamerican, middle_eastern
        Description thor_hammer_desc
        EffectsDescription thor_hammer_effects_desc
        Effect Authority  1 
        Effect TroopMorale  1 
        Effect Law  2
    Trigger
    Code:
    ;------------------------------------------
    Trigger thor_hammer_vnv_trigger
        WhenToTest PostBattle
        Condition WasAttacker
              and IsGeneral
              and WonBattle
              and GeneralFoughtInCombat
              and PercentageEnemyKilled > 66
              and BattleOdds < 1.5
              and Trait BattleDread > 0
    
        AcquireAncillary thor_hammer chance  50
    GED am i done with the course?
    Contribuitor IBIICB-WOTN-Modeler-Scripter


  3. #23
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,844
    Blog Entries
    10

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    Looking good everyone. I will add names to the list.

  4. #24
    Hunter Makoy's Avatar We got 2 words for ya..
    Join Date
    Apr 2007
    Location
    Dont mess with Texas
    Posts
    5,202

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    Quote Originally Posted by Alex-ander View Post
    Two things i learnt from this class,

    Never mod while you are tired. You may well make a mistake.

    Never mod if you have had a couple of drinks you definatly will make a mistake.
    yeah who would've thought sleepy drunks would make mistake in modding? :laughing:
    Under the patronage of Lord Condormanius (12.29.08)
    "Yes, I know why the leaf is turning yellow. Its a lack of chloroform."

  5. #25
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,844
    Blog Entries
    10

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    Also I never name the ancillary the same as the trigger, append it with _trigger or something so there is no confusion.

    If you are getting a crash, comment out the trigger and make sure the ancillary part works. If it does then there is something wrong with the trigger. Just a way of narrowing it down a bit.

  6. #26
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,844
    Blog Entries
    10

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    {white_stallion_desc_effects}+25% to Movement Points (gives armies the ability to forced march)


    Code:
     EffectsDescription white_stallion_effects_desc
    Aha!

    I didnt notice that the first time around. Sorry.

  7. #27
    Hunter Makoy's Avatar We got 2 words for ya..
    Join Date
    Apr 2007
    Location
    Dont mess with Texas
    Posts
    5,202

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    oooo yeah thats a tough one to figure out. i also end up putting effect instead of effects sometimes too.

    esp. when your doing a whole list of traits and everything starts to blur together.
    Under the patronage of Lord Condormanius (12.29.08)
    "Yes, I know why the leaf is turning yellow. Its a lack of chloroform."

  8. #28

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    If you are getting a crash, comment out the trigger and make sure the ancillary part works. If it does then there is something wrong with the trigger. Just a way of narrowing it down a bit.
    How do i comment out the trigger. Is it something like the REM that was used in basic.

  9. #29
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,844
    Blog Entries
    10

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    Just use a semicolon.

    ; this is a comment

  10. #30

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    edited
    Last edited by Alex-ander; December 28, 2008 at 03:37 AM.

  11. #31

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    stuff moved. delete at your own convenience.
    Last edited by absinthia; December 28, 2008 at 01:39 PM.
    Hr. Alf han hugg til han var mod, Han sto i femten Ridderes Blod; Så tog han alle de Kogger ni Og sejlede dermed til Norge fri. Og der kom tidende til Rostock ind, Der blegned saa mangen Rosenkind. Der græd Enker og der græd Børn, Dem hadde gjort fattig den skadelige Ørn.
    Anders Sørensen Vedel

  12. #32

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    I have really run out of ideas with trying to add an ancillary. Nothing seems to work for me. I can add a Vanilla ancillary with no problems. It really needs somebody to look over the files. And see if i am missing something please can somebody check these files.

    Here they are
    export_dscr_ancillaries
    Attachment 26150

    export ancillaries.txt
    Attachment 26152

    export_dscr_ancilaries_emums
    Attachment 26153

    The log file
    Attachment 26154

    The log file does show a script error but i have not idea if that is relevant to my problem. Really as i said i have run out of ideas to get this working. I am beginning to think my mod is faulty maybe i made a typo somewhere that was not enough to stop the mod working but makes it crash if i try anything else. I am open to suggestions.
    Last edited by Alex-ander; May 04, 2010 at 01:05 PM.

  13. #33

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    I have decided to slash and burn. I think either my game or mod have become corrupt so i will reinstall the game and redo the mod folders. I presume i dont need to redo all the lessons as i have already done them.

    I just need to get the ancillary and trait bit done

    Is their a way to get the game animations to appear in our mod. I thought i saw somthing here but i cant find it now.
    Last edited by Alex-ander; December 29, 2008 at 08:35 AM.

  14. #34
    Nevada's Avatar Domesticus
    Join Date
    Jun 2007
    Location
    Bavaria
    Posts
    2,197

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    sry, I couldn't answer your PM, I jsut found the time to look through it, but i didn't find anything.

    Before you redo everything (if you haven't started already):
    I can give you my working files and you can use them to test if it's your modfolder.
    If it doesn't work, it must be your modfolder...



  15. #35

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    Thanks Nevada i sorted it it out. It must have been that my game/mod folder was corrupted. I redid it and the script that was causing a CTD every time worked first time and my ancillary appears so the trigger works. Now to get to grips with traits :hmmm:

    It was good practice redoing the mod and what took me weeks and many crashes i did in a few hours with only one CTD which was easy to sort out.

    A question about traits and all other scripts really if you look in the vinalla files everything is neat with blank lines between the lines of a script or at the end of a script. Do you need to maintain the same format or do the blank lines not matter.
    Last edited by Alex-ander; December 30, 2008 at 04:49 AM.

  16. #36
    Nevada's Avatar Domesticus
    Join Date
    Jun 2007
    Location
    Bavaria
    Posts
    2,197

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    i don't think you have to keep the layout, but I think it helps you to keep the overview over the stuff you add.



  17. #37

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    edited
    Last edited by Alex-ander; December 30, 2008 at 10:28 AM. Reason: Edited

  18. #38
    Hunter Makoy's Avatar We got 2 words for ya..
    Join Date
    Apr 2007
    Location
    Dont mess with Texas
    Posts
    5,202

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    yes i always try to keep the same order as far as lines above and below, how far things are indented, and whether it uses tabs or spaces. i think that in many cases it doesn't matter, but sometimes it makes a huge difference. take for example the family trees, if its not done with tabs and spaces in the correct order and number, it will crash. so as i general rule of thumb i try to keep things the same. however, if you look at the traits files for other mods, sometimes they use a slightly different indent style, and it seems to work fine.

    if you've managed to get ancs to work, the traits shouldn't be a problem for you. your following the same basic system, except there is no .tga file, and you have thresholds and levels.
    Under the patronage of Lord Condormanius (12.29.08)
    "Yes, I know why the leaf is turning yellow. Its a lack of chloroform."

  19. #39

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    I'm getting a CTD after the splash screen after I completed the code for my ancillary. Here's the relevant sentence in the log:

    "15:16:10.484 [script.err] [error] Script Error in mods/ModBasics/data/export_descr_ancillaries.txt, at line 11, column 5
    expecting category"

    I checked that part of the log and on the web, but I haven't been able to find out what that means, exactly. Here are pictures of the code for my ancillary and its trigger:

    Spoiler Alert, click show to read: 

    The ancillary image is only temporary




    I used screenshots with the M2TW formatting to make it easier to debug I know that mostly everybody who will finish this class has finished, but please help me anyway!

  20. #40
    Hunter Makoy's Avatar We got 2 words for ya..
    Join Date
    Apr 2007
    Location
    Dont mess with Texas
    Posts
    5,202

    Default Re: Lesson 4 part 2 Traits and Ancillaries

    it says it was looking for it in line 11, which doesn't make much since because thats where the transfer is, not the type. i dont have the vanilla texts infront of me so i can't really double check against anything. i think you have it in the right order, but maybe there should be a blank line there.
    Under the patronage of Lord Condormanius (12.29.08)
    "Yes, I know why the leaf is turning yellow. Its a lack of chloroform."

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

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