how to get dude_obj real one,always

Discussion in 'Fallout General Modding' started by Nirran, May 18, 2019.

  1. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    seems this doesnt work

    Code:
    if (has_trait(0, sfall_func0("real_dude_obj"), 73)) then begin
             if ((obj_art_fid(arg0) % 512) == 67) then begin
                item := create_object_sid(276, 0, 0, -1);
    
    and this causes the engine to check the wrong dude obj

    Code:
       if (((obj_art_fid(arg0) % 512) == 13) or ((obj_art_fid(arg0) % 512) == 6) or ((obj_art_fid(arg0) % 512) == 45) or ((obj_art_fid(arg0) % 512) == 34) or ((obj_art_fid(arg0) % 512) == 95)) then begin
          if ((has_skill(dude_obj, 13) >= 50) or has_trait(0, dude_obj, 44)) then begin
             random_roll := random(1, 100);
             if (random_roll < (100 - (3 * get_critter_stat(dude_obj, 6)))) then begin
                add_obj_to_inven(arg0, create_object_sid(74, 0, 0, -1));
             end
             else begin
                add_obj_to_inven(arg0, create_object_sid(265, 0, 0, -1));
             end
          end
       end
    
    just want a way of returning stats from the real dude obj,even in 'control party members' mode
     
  2. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    281
    Oct 29, 2015
    ps: Use macros your script code is not readable.
     
  3. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    whats not readable in
    Code:
    sfall_func0("real_dude_obj")
    ?
     
  4. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    281
    Oct 29, 2015
    The engine is not designed to control party members, even after the introduction of a crutch (mod) to control party members, and there are a lot of problems with this.
    therefore, I urge everyone not to use control of other NPCs for regular play. :)
     
    Last edited: May 19, 2019
  5. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    i generaly dont,im chasing a bug in my mod that occurres when control is active
     
  6. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    281
    Oct 29, 2015
    In your case, the engine handles the perks of the current PM. And player perks/taits are not available.
     
  7. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    boo,not possible to return perks known from real dude then?
     
  8. Mr.Stalin

    Mr.Stalin Agent of Enclave Modder

    281
    Oct 29, 2015
    for now it is impossible.
    Any request to get dude statistics, while controlling another NPC will return incorrect values.:)
     
    Last edited: May 20, 2019
  9. Nirran

    Nirran Vault Senior Citizen
    Modder

    Apr 15, 2007
    club there fight