Skip to content

General mod Questions thread

1343537394070

Comments

  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited October 2018
    @kjeron, @Gwendolyne

    Thanks for the info!
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited October 2018
    1) What's the difference between EscapeArea() and DestroySelf() (apart from the fact that the latter makes a CRE disappear instantly)?

    2) When patching existing scripts (e.g., baldur.bcs), is it better to use EXTEND_TOP or EXTEND_BOTTOM?
  • QuickbladeQuickblade Member Posts: 957
    What's the difference between picking "Not Dispel/Bypass Resistance" and "Nonmagical" for effects?

    A search suggested that an effect that is nonmagical will work in a magic-dead zone, but that's pretty niche for an effect from a spell. AFAIK, the only magic-dead zones are in a few small areas in Watcher's Keep.
  • The user and all related content has been deleted.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited October 2018
    Another day, another oddity.

    The class (offset 0x273) of my CRE is set to THIEF and the following script is attached to it:

    IF
    	OnCreation()
    THEN
    	RESPONSE #100
      		ChangeEnemyAlly(Myself,FAMILIAR)
     		MakeGlobalOverride()
      		AddFamiliar()
    END


    That CRE is summoned via opcode #67.

    The problem is that the CRE is not a Thief when it's summoned (the action bar lacks the Stealth button, the Find Traps button and the like....) ---> it becomes a Thief only after entering a building (or changing area).

    The problem seems to be related to my script. What's wrong with that?
  • kjeronkjeron Member Posts: 2,367
    edited October 2018
    @Luke93 The AddFamiliar() action temporarily sets all of a creatures non-EA values to 0 (GENERAL, CLASS, RACE, GENDER, ALIGNMENT, SPECIFICS). Anything that forces that character's action-bar to update itself will revert the creature to it's normal values (and action-bar).
    For example:
    • Casting a spell from a quick-spell slot (needs to update the quantity)
    • Changing the spell in a quick-spell slot
    • Using a quick-item with quantity/charges
    Then re-select the character.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    @kjeron

    Thanks for the clarification!

    I fear my CRE cannot do what you suggested, so I added the following action
    SetGlobal("gt_spawned","locals",1)
    to the previous block plus the following IF block:
    IF
    	Global("gt_spawned","locals",1)
    THEN
    	RESPONSE #100
    		ChangeGeneral(Myself,ANIMAL)
    		ChangeRace(Myself,CAT)
    		ChangeClass(Myself,THIEF)
    		ChangeGender(Myself,MALE)
    		ChangeAlignment(Myself,NEUTRAL)
    		SetGlobal("gt_spawned","locals",0)
    END


    Do you think it's a good fix?
  • kjeronkjeron Member Posts: 2,367
    It should be functional, but I'm not sure how the AddFamiliar() action really works other than screwing up those stats, so I don't know if it will have side-effects.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    kjeron said:

    It should be functional, but I'm not sure how the AddFamiliar() action really works other than screwing up those stats, so I don't know if it will have side-effects.

    After a quick test, I noticed no side-effect..... Do you think AddFamiliar() is bugged (i.e., it should not screw up those stats)?

    I'd like to summon @argent77 too (he probably makes use of this action in his "Golem construction mod for spellcasters"....)
  • kjeronkjeron Member Posts: 2,367
    Luke93 said:

    Do you think AddFamiliar() is bugged (i.e., it should not screw up those stats)?

    Most likely, the only one it should be altering is the EA value (FAMILIAR).
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited October 2018
    kjeron said:

    Luke93 said:

    Do you think AddFamiliar() is bugged (i.e., it should not screw up those stats)?

    Most likely, the only one it should be altering is the EA value (FAMILIAR).
    I see. I'll report this issue then....

    Anyway, are AddFamiliar() and ChangeEnemyAlly(Myself,FAMILIAR) equivalent?

    EDIT: no, it seems they're not equivalent.... The latter doesn't allow me to control the CRE in question (i.e., I can only talk to it but cannot select it......)
    Post edited by _Luke_ on
  • argent77argent77 Member Posts: 3,433
    Luke93 said:

    kjeron said:

    It should be functional, but I'm not sure how the AddFamiliar() action really works other than screwing up those stats, so I don't know if it will have side-effects.

    After a quick test, I noticed no side-effect..... Do you think AddFamiliar() is bugged (i.e., it should not screw up those stats)?

    I'd like to summon @argent77 too (he probably makes use of this action in his "Golem construction mod for spellcasters"....)
    I can't provide further insight into this script action, except that it's needed if you want to turn a creature into a NPC-like companion.

    For Djinni Companion and Golem Construction I'm using these script actions to turn creatures into companions (order of actions is important):
    MakeGlobal() ChangeEnemyAlly(Myself,FAMILIAR) AddFamiliar()
  • kjeronkjeron Member Posts: 2,367
    Luke93 said:

    EDIT: no, it seems they're not equivalent.... The latter doesn't allow me to control the CRE in question (i.e., I can only talk to it but cannot select it......)

    Oddly, if you save and reload, the CRE will then be controllable.

    The "Ally()" action will also make them controllable, but changes their EA to ALLY, so it would have to be run before "ChangeEnemyAlly(Myself,FAMILIAR)".
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited October 2018
    argent77 said:


    For Djinni Companion and Golem Construction I'm using these script actions to turn creatures into companions (order of actions is important):
    MakeGlobal() ChangeEnemyAlly(Myself,FAMILIAR) AddFamiliar()

    Sadly, this does not fix the issue :( (i.e., the action-bar is still broken......)

    I guess I'll make use of the following additional block
    IF
    	Global("gt_spawned","locals",1)
    THEN
    	RESPONSE #100
    		ChangeGeneral(Myself,"what_is_supposed_to_be")
    		ChangeRace(Myself,"what_is_supposed_to_be")
    		ChangeClass(Myself,"what_is_supposed_to_be")
    		ChangeGender(Myself,"what_is_supposed_to_be")
    		ChangeAlignment(Myself,"what_is_supposed_to_be")
    		SetGlobal("gt_spawned","locals",0)
    END

    to fix the issue...... Or, alternatively, I can try what @kjeron said, so
    IF
    	OnCreation()
    THEN
    	RESPONSE #100
    		MakeGlobalOverride()
    		Ally()
    		ChangeEnemyAlly(Myself,FAMILIAR)
    END

    (i.e., replace AddFamiliar() with Ally().....)

    Can you think of any (bad/undesired) side-effect?
  • BubbBubb Member Posts: 1,000
    Anyone know when, or even if, this flag is ever used in the vanilla game? I can set it through memory edits / Near Infinity, and it works just fine. Couldn't find any situations where the engine actually sets it - I'm curious if it even has a use currently.

    Pinging @kjeron, because why not. :p
  • kjeronkjeron Member Posts: 2,367
    No clue. The game does clear the flag when resting though, if it has been manually set. So I would guess that this "disabled" is not related to opcode 145 in any way.

    While it blocks the spell from being cast manually and through the "Spell()" action, it does not block the spell from being cast through Select Spell (opcode 214) Type "1"** casting, which until now as far as I knew had the same rules as manual casting and the "Spell()" action.
    **For reference, "Type" refers to the last column of the 2da (this is Spell Immunity, which uses type 3):
    2DA V1.0
    ****
                	ResRef	Type    
    ABJURATION	SpWi590	3
    CONJURATION	SpWi591	3
    DIVINATION	SpWi592	3
    ENCHANTMENT	SpWi593	3
    ILLUSIONIST	SpWi594	3
    INVOCATION	SpWi595	3
    NECROMANCY	SpWi596	3
    ALTERATION	SpWi597	3
  • ArthasArthas Member Posts: 1,091
    edited November 2018
    I would like to add silver scales to adalon.

    Then add the dialogue to Cromwell or Cespenar to forge these.

    Where should I start?
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited November 2018
    kjeron said:

    Luke93 said:

    EDIT: no, it seems they're not equivalent.... The latter doesn't allow me to control the CRE in question (i.e., I can only talk to it but cannot select it......)

    Oddly, if you save and reload, the CRE will then be controllable.

    The "Ally()" action will also make them controllable, but changes their EA to ALLY, so it would have to be run before "ChangeEnemyAlly(Myself,FAMILIAR)".
    Yep, Ally() seems to fix the problem (i.e., the action-bar is not broken.....)

    IF
    	OnCreation()
    THEN
    	RESPONSE #100
    		MakeGlobalOverride()
    		Ally()
    		ChangeEnemyAlly(Myself,FAMILIAR)
    END

    However, Argent77 said AddFamiliar() is necessary if you want to turn a creature into an NPC-like companion...........
  • Magis365Magis365 Member Posts: 1
    Hello, good morning, recently I started doing some modding, I still do not understand many things, but little by little I understand.

    Recently I came across a problem that I can not find a solution for, it exceeds my capabilities. That's why I was passing by here to ask for some help.

    I made a modification with near infinity, I tried it in the game and it went very well, but I can not change the image above to what I have.

    As I read in the tutorials, I have to delete the block or modify it, but I do not know what commands are used or how they are used.

    basically I want the image 1 to disappear from the .bcs, and to write it from the image 2 in the .bcs.

    If you can help me, I would appreciate it.

    P.D: Sorry for the language, I speak Spanish and I do not write in English, so use Google.




    Hola, buenos días, hace poco que comencé a hacer algo de modding, sigo sin entender muchísimas cosas, pero de a poco comprendo.

    Recientemente me tope con un problema que no le encuentro solución, excede mis capacidades. Por eso pasaba por aquí a pedir algo de ayuda.

    actualmente hice una modificación con near infinity, la probé en el juego y anduvo muy bien, pero no logro poder modificar la imagen de arriba a lo que tengo.

    según leí en los tutoriales, tengo que borrar el bloque o modificarlo, pero no se que comandos se usan ni como se usan.

    básicamente quisiera que lo de la imagen 1 desaparezca del .bcs, y escribir lo de la imagen 2 en el .bcs.

    si me pueden ayudar se lo agradecería.

    P.D: perdón por el idioma, hablo español y no se escribir en ingles, así que use Google.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited November 2018
    kjeron said:

    @Luke93 The AddFamiliar() action temporarily sets all of a creatures non-EA values to 0 (GENERAL, CLASS, RACE, GENDER, ALIGNMENT, SPECIFICS). Anything that forces that character's action-bar to update itself will revert the creature to it's normal values (and action-bar).
    For example:

    • Casting a spell from a quick-spell slot (needs to update the quantity)
    • Changing the spell in a quick-spell slot
    • Using a quick-item with quantity/charges
    Then re-select the character.

    Fun fact: if I put this

    MakeGlobal()
    ChangeEnemyAlly(Myself,FAMILIAR)
    AddFamiliar()

    in a dialog (i.e., if that list is an action of a dialog), then AddFamiliar() seems to work fine (i.e., it does not temporarily set those non-EA values to 0......).

    Do you perhaps know why?
  • kjeronkjeron Member Posts: 2,367
    edited November 2018
    Luke93 said:

    Do you perhaps know why?

    Might be related to how some actions do not process "instantly" when run during dialogues. I think it takes 2 transitions (replies) before they actually take effect. Some won't even take effect until the dialog is exited. If those secondary effects are applied separately, maybe they are getting dropped by the delay.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited November 2018
    kjeron said:

    Luke93 said:

    Do you perhaps know why?

    Might be related to how some actions do not process "instantly" when run during dialogues. I think it takes 2 transitions (replies) before they actually take effect. Some won't even take effect until the dialog is exited. If those secondary effects are applied separately, maybe they are getting dropped by the delay.
    This is my .d file in case you're interested (no transitions):

    IF ~NumTimesTalkedTo(0)~ THEN
    BEGIN state1
    SAY ~Do you think AddFamiliar() will work now? I DO hope so...~
    IF ~~ THEN
    		DO ~MakeGlobal()
    			ChangeEnemyAlly(Myself,FAMILIAR)
    			AddFamiliar()~ EXIT
    END
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited November 2018
    fluke13 said:

    The ini is there, but the bgee (without SOD) doesn't have the new palette for some reason. I haven't tested it. Add that bmp to your override and see if it works now. If it does work after that, it would be good if you add this to the support bugfix website, so it can be fixed in the next update.

    Basically - I had a look at both bgee and SOD for you and the only difference I found was bgee missing that .bmp file which is referenced as a palette in the ini file.

    Thanks, it works now.

    Do you know what is needed for 0xE280 (WOLF_WORG)?
  • GwendolyneGwendolyne Member Posts: 461
    The MWORA1,A1E,A2,A2E...,SD,SDE... BAM files in SoD and IWD2.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited November 2018

    The MWORA1,A1E,A2,A2E...,SD,SDE... BAM files in SoD and IWD2.

    So, I basically have to look for the following entry "resref = MWOR" and then export all those files named MWORxxx.bam.... And the same holds for the sound sets (WAV files).... Thanks.
    Post edited by _Luke_ on
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    Can 'Statistic Modifier' of opcode #22 (Cumulative Luck Bonus) be negative?
  • The user and all related content has been deleted.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited November 2018

    Luke93 said:

    Can 'Statistic Modifier' of opcode #22 (Cumulative Luck Bonus) be negative?

    Don't see why not.
    Yeah, it can be negative, just tested :)

    Sorry if it sounded as a stupid question, but the IESDP usually states it clearly if a certain parameter can take negative values.......
  • The user and all related content has been deleted.
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535
    edited December 2018

    The IESDP is woefully out of date unfortunately.

    https://gibberlings3.github.io/iesdp/ ----> Last update: 12/10/2018 (i.e., it doesn't seem to be woefully out of date.....)
Sign In or Register to comment.