Editing traits

Discussion in 'Fallout General Modding' started by Ravager, Jul 31, 2010.

  1. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    No, pelicano's answer was the correct one. Had anyone ever actually looked at the modders pack:

    Code:
    ;Since traits need to be picked before any scripts run, they
    ; have an additional NoHardcode option in this file which can
    ; be used to remove their hardcoded effects
     
  2. Lexx

    Lexx Testament to the ghoul lifespan
    Moderator Modder

    Apr 24, 2005
    Jup, but I simply suck at doing this sfall scripting stuff. :P

    /Edit: To be more clear, with what I have problems. You wrote "When adding extra perks to a mod, it's advisable to use the fake perk scripting functions rather than make modifications" so I didn't added my new perk via this file, but via script. I am using the example script in the modders pack. But none of my new perks show up, regardless of what requirements I give them.

    /Edit²: Something else. Is it possible to use the perk "Skill1=x" and "Skill1Mag=y" stuff in traits also? I wonder if I can modify players stats with it as well. Then I would need not a single bit of script for my trait changes.
     
  3. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    nevermind,pretty obvious

    just disable the perk,then grant a fake_trait,not that hard,IM me i will help write it

    Nirran
     
  4. Lexx

    Lexx Testament to the ghoul lifespan
    Moderator Modder

    Apr 24, 2005
    I just tested the new perks stuff again and it just doesn't work. It doesn't even work in the example mods that come with the modders pack. Changing the description and stats of existing perks (via script) seems to work, but everything that has to do with adding a new fake perk, doesn't work for me. Am I the only one with that problem?

    /Edit: I mean gltschardev2.ssl

    /Edit²: Ok, I think I got it now.... gltschardev2 needs to be used *with* the other gltschardev... I alwas thought it's just a simple "this is version 1 and this is version 2"-thingy...
     
  5. Bf109

    Bf109 First time out of the vault

    20
    Jul 13, 2010
    Would it be possible to add Night Person as a PERK so people who like it can edit it in with F2SE or something? Or maybe just a perk with min Lvl 1 and no other requirements?

    Edit: oops, just read page 2 now...nevermind.
     
  6. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    no but you can edit level requierments for night vision

    edit : name this gl_whatever,compile and drop it in the scripts folder

    Code:
    procedure start;
    
    procedure start begin
       if(game_loaded) then 
          begin
             set_global_script_repeat(0);
             set_perk_level(11, 1); //11 is night vision
          end 
    end
    
    these will allow manipulation of stock perks,i think this is a complete list

    Code:
             set_perk_name(44, "Armorer");
             set_perk_desc(44, "You have mastered the art of repairing and assembling armor from vanquished foes. You are able to loot armor from enemies without a skill check.");
             set_perk_ranks(44, 1);
             set_perk_level(44, 21);
             set_perk_image(44, 101);
             set_perk_stat(44, 0); 
             set_perk_stat_mag(44, 0); 
             set_perk_skill1(44, 0); 
             set_perk_skill1_mag(44, 0); 
             set_perk_type(44, 0); 
             set_perk_skill2(44, 0); 
             set_perk_skill2_mag(44, 0); 
             set_perk_str(44, 0); 
             set_perk_per(44, 0); 
             set_perk_end(44, 0); 
             set_perk_chr(44, 0); 
             set_perk_int(44, 0); 
             set_perk_agl(44, 0); 
             set_perk_lck(44, 0); 
    
    Nirran
     
  7. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    put this in Perks.ini,in ddraw.ini uncomment ;PerksFile=Perks.ini

    Code:
    [t7]
    NoHardcode=1
    Name=Example
    Desc=This is an example trait
    
    now the trait does nothing,then write a global script for the new trait,similar to this

    Code:
    procedure start;
    
    procedure start begin
       if(game_loaded) begin
             if(has_trait(2,dude_obj,7)) and (get_sfall_global_int("replace0") == 0)then begin
                set_sfall_global("replace0", 1);
                set_fake_trait(char* name, int active(1 or 0), int image(from skilldex.lst), char* desc);
                set_global_script_repeat(0);
             end
        end
    end
    
    now need to set effects of new trait(or simple grant a vanilla)
    ,in a new script
    Code:
    procedure start;
    
    procedure start begin
       if(game_loaded) begin
          /*depending what the trait does,you may need set_global_script_repeat(x); some number(this function sets how often sfall fires the script,if set to 0 it will fire once on game load,then turn itself off ,otherwise fires every x frames*/
       end else begin
       if(has_fake_trait("trait name[same as above]") > get_sfall_global_int("trait_01")) then 
          begin
             set_sfall_global("trait_01", get_sfall_global_int("trait_01", ) + 1);
             //add effects here	
          end
    end
    
    pretty much it

    edit : or do this to get rid of bonus rate of fire

    gl_whatever

    Code:
    procedure start;
    
    procedure start begin
       if(game_loaded) then begin
             set_perk_name(7, "Bonus Rate of Fire");
             set_perk_desc(7, "");
             set_perk_ranks(7, 50);
             set_perk_level(7, 100);
            set_global_script_repeat(0);
       end
    end
    
    Nirran
     
  8. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    No, that information doesn't exist in the traits table, so there's no way around scripting it. :(
     
  9. Lexx

    Lexx Testament to the ghoul lifespan
    Moderator Modder

    Apr 24, 2005
    Some time ago, Helios made skill formula changes for me with editing the fallout2.exe. So if you took trait x, the basic formular for skill y changed (the formular to calculate the very first skill %). Due to this, it was running straight in character creation. Pick the trait and skill % changed, etc. Very nice.

    No chance to make something like this editable with sfall and without editing the exe file?
     
  10. Timeslip

    Timeslip Water Chip? Been There, Done That
    Modder

    921
    Aug 15, 2007
    That's exactly what the traint_adjust_skill hookscript that nirran mentioned used to do. I had to remove it because it kept calling itself, and fallout scripts don't handle recursion too well, plus it didn't work properly at character generation anyway. I can replace it with something that isn't script based, and that will work for character generation, but I'm going to be away for a bit, so the next version of sfall isn't likely to be until october. Add it to the wiki so that I don't forget.
     
  11. Ravager

    Ravager Look, Ma! Two Heads!

    305
    Nov 18, 2008
    I could hug you! In a none sexual way of course.

    So it seems it's possible right?

    Someone could just throw out Fast Shot and add back Night Person.

    It should also be possible to like change the negative effect on Bruiser right? I mean common 2 points of strength for less action points? If your bigger and stronger why not just decrease AC?
     
  12. Ravager

    Ravager Look, Ma! Two Heads!

    305
    Nov 18, 2008
    Bump... did anyone manage to get this working?
     
  13. Hopper

    Hopper First time out of the vault

    50
    Sep 4, 2010
    Well, Lexx have modded traits in Shattered Destiny 2, he modified them.

    But, creating new traits from scratch... will be a pain in the ass. A serious.
     
  14. Lexx

    Lexx Testament to the ghoul lifespan
    Moderator Modder

    Apr 24, 2005
    Additional traits doesn't work, because the interface isn't made for more. The only possible way is to make it like in Timeslips example, where you start the game, open the character screen and pick new traits like picking perks.
     
  15. Hopper

    Hopper First time out of the vault

    50
    Sep 4, 2010
    Yes, but it's kind of weirdo, no?
     
  16. Lexx

    Lexx Testament to the ghoul lifespan
    Moderator Modder

    Apr 24, 2005
    Well, I wouldn't do it, because it doesn't look good in my opinion.