Jump to content

Maximum HP bonus


Salk

Recommended Posts

Posted

Hello again!

I have been trying to make the familiar level up with the wizard and to accomplish this I have done the following:

In the familiars' script:

IF
LevelGT(Player1,1)
Global("WTPFLVL","GLOBAL",0)
THEN
    RESPONSE #100
ApplySpellRES("WTPFMLVL",Myself)
ActionOverride(Player1,ReallyForceSpellRES("WTPFCon2",Myself))
SetGlobal("WTPFLVL","GLOBAL",1)
END


IF
LevelGT(Player1,2)
Global("WTPFLVL","GLOBAL",1)
THEN
    RESPONSE #100
ApplySpellRES("WTPFMLVL",Myself)
ActionOverride(Player1,ReallyForceSpellRES("WTPFCon2",Myself))
SetGlobal("WTPFLVL","GLOBAL",2)
END


IF
LevelGT(Player1,3)
Global("WTPFLVL","GLOBAL",2)
THEN
    RESPONSE #100
ApplySpellRES("WTPFMLVL",Myself)
ActionOverride(Player1,ReallyForceSpellRES("WTPFCon2",Myself))
SetGlobal("WTPFLVL","GLOBAL",3)
END


...

WTPFLVL adds 4 HPs to the Familiar and WTPFCon2 adds 2 Max Hit Points to the wizard. This goes up to level 50 with the only difference that the HPs gained will become lower after level 9 and after level 19.

 

When the familiar dies, I do something very similar but using negative numbers to remove the Max Hit Points from the Wizard.


IF
Die()
Global("WTPFLVL","GLOBAL",1) // Familiar Lv 2
THEN
    RESPONSE #100
ActionOverride(Player1,ReallyForceSpellRES("WTPFCon6",Myself))
END


IF
Die()
Global("WTPFLVL","GLOBAL",2) // Familiar Lv 3
THEN
    RESPONSE #100
ActionOverride(Player1,ReallyForceSpellRES("WTPFCon6",Myself))
ActionOverride(Player1,ReallyForceSpellRES("WTPFCon6",Myself))
END


IF
Die()
Global("WTPFLVL","GLOBAL",3) // Familiar Lv 4
THEN
    RESPONSE #100
ActionOverride(Player1,ReallyForceSpellRES("WTPFCon6",Myself))
ActionOverride(Player1,ReallyForceSpellRES("WTPFCon6",Myself))
ActionOverride(Player1,ReallyForceSpellRES("WTPFCon6",Myself))
END

...

 

My problem is this:

 

http://picpaste.com/....1417520214.jpg

I hope the image is readable enough. When the familiar levels up instead of modifying the Maximum Hit Points field of the .cre file, the game adds a bunch of Maximum Hit Points bonus effects and it does the same when they are taken away at the death of the familiar. It works. But the file would bloat with effects and I can't imagine this is healthy.
Would it not possible to somehow just remove those effects?
Any suggestion?
Thanks!
Posted

That was it!

 

Thanks!

 

I didn't think it had any bearing because of this: http://forums.gibberlings3.net/index.php?showtopic=26892

 

In that case, the effect is set to Timing 1 for all opcodes but opcodes 275 (Hide in Shadow) and 276 (Detect Illusion) appear as additional effects in the creature's list instead of changing directly the Hide in Shadow and Detect Illusion value like the rest do.

 

If you have any idea about this as well, please let me know.

 

Thanks again, Wisp!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...