Jump to content

Photo

make creature temporarily invulnerable?


18 replies to this topic

#1 Daxtreme

Daxtreme
  • Members
  • 119 posts
  • Gender:Not Telling
  • Location:Quebec

Posted 01 March 2018 - 11:38 PM

Hey guys, short question:

 

Is there a state flag, oppcode, or anything that I could use to set a cre's status to, like, "invulnerable" for like 2 seconds, then it goes away?

 

Thanks!


Edited by Daxtreme, 01 March 2018 - 11:38 PM.


#2 Roxanne

Roxanne

    Modder

  • Modders
  • 2041 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 02 March 2018 - 12:10 AM

 

Invulnerability is not a single state, it is a stacking of effects like set AC, resistance against this and that + immunity from one thing or other.At least I have never seen it as state or flag or opcode.


Edited by Roxanne, 02 March 2018 - 12:11 AM.

The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#3 Daxtreme

Daxtreme
  • Members
  • 119 posts
  • Gender:Not Telling
  • Location:Quebec

Posted 02 March 2018 - 08:51 AM

Would it be possible to give an item to a creature that essentially makes it invulnerable (demilich ring + whatever's missing), then taking it away 2 seconds later?

 

Or taking away a creature's item in-game might cause problems?



#4 Roxanne

Roxanne

    Modder

  • Modders
  • 2041 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 02 March 2018 - 08:55 AM

Would it be possible to give an item to a creature that essentially makes it invulnerable (demilich ring + whatever's missing), then taking it away 2 seconds later?

 

Or taking away a creature's item in-game might cause problems?

You can try that.

Here is a ring (Maybe you have SoD yourself?)

Attached File  BDTROLL2.zip   297bytes   25 downloads


The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#5 Daxtreme

Daxtreme
  • Members
  • 119 posts
  • Gender:Not Telling
  • Location:Quebec

Posted 02 March 2018 - 09:06 AM

Unfortunately I don't have SOD installed, although I do own it.

 

I'm finishing this playthrough before refreshing my mods and installing EET, and all the things.

 

Is that item SOD dependent?



#6 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Gibberling Poobah
  • 9677 posts
  • Gender:Not Telling

Posted 02 March 2018 - 09:09 AM

minhp1 provides invulnerability and is in pretty much every game.


Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.


#7 Roxanne

Roxanne

    Modder

  • Modders
  • 2041 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 02 March 2018 - 09:16 AM

Unfortunately I don't have SOD installed, although I do own it.

 

I'm finishing this playthrough before refreshing my mods and installing EET, and all the things.

 

Is that item SOD dependent?

 

 

minhp1 provides invulnerability and is in pretty much every game.

The item I posted should work in any game just have no adequate name + description..

MinHP1 prevents a creature from dying as there will always be 1hp left. The creature will nevertheless take all kinds of damage, i.e. it is vulnerable. It will depend on the intention whether this is sufficient..


The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#8 Daxtreme

Daxtreme
  • Members
  • 119 posts
  • Gender:Not Telling
  • Location:Quebec

Posted 02 March 2018 - 09:17 AM

Yes I need it to be totally invulnerable to all damage and status effects, death effects, everything

 

I will try out this ring thanks Roxanne!



#9 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6713 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 03 March 2018 - 05:14 AM

Yes I need it to be totally invulnerable to all damage and status effects, death effects, everything

 

I will try out this ring thanks Roxanne!

Well, then just copy the item and then just add effects to that item that make it damage invulnerable:

COPY_EXISTING ~minhp1.itm~ ~override/customitemname.itm~ 
LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=65 target=1 timing= duration= parameter2=12 //spell damage
LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=120 target=1 timing= duration= parameter1=1 parameter2=9 END //melee damage 1
LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=120 target=1 timing= duration= parameter1=2 parameter2=9 END //melee damage 2
LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=120 target=1 timing= duration= parameter1=3 parameter2=9 END
LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=120 target=1 timing= duration= parameter1=4 parameter2=9 END
LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=120 target=1 timing= duration= parameter1=5 parameter2=9 END
LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=120 target=1 timing= duration= parameter1=6 parameter2=9 END
LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=120 target=1 timing= duration= parameter1=7 parameter2=9 END
LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=120 target=1 timing= duration= parameter1=8 parameter2=9 END
LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=120 target=1 timing= duration= parameter1=9 parameter2=9 END
LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=120 target=1 timing= duration= parameter1=10 parameter2=9 END
LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=120 target=1 timing= duration= parameter1=11 parameter2=9 END
BUT_ONLY

I forgot what the timers for the while equipped in that is, and target (self, should be 1), but that should be most of it anyways.


Edited by Jarno Mikkola, 03 March 2018 - 05:16 AM.

Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#10 Daxtreme

Daxtreme
  • Members
  • 119 posts
  • Gender:Not Telling
  • Location:Quebec

Posted 03 March 2018 - 08:57 AM

Do you know if there are any bugs with removing an item midgame from a character?



#11 Roxanne

Roxanne

    Modder

  • Modders
  • 2041 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 03 March 2018 - 09:18 AM

Do you know if there are any bugs with removing an item midgame from a character?

There is no problem

Action

DestroyItem("bdtroll2") or DestroyItem("minhp1")

In a script will do that without problem if in the script of the creature that has the item.

If done from another creature, you can either use ActionOverride("creaturewithitem",DestroyItem("bdtroll2")) or first take the item from the cre and then destroy it.


The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#12 Daxtreme

Daxtreme
  • Members
  • 119 posts
  • Gender:Not Telling
  • Location:Quebec

Posted 03 March 2018 - 09:21 AM

Thanks a lot guys, I will try these things out soon :) 



#13 Daxtreme

Daxtreme
  • Members
  • 119 posts
  • Gender:Not Telling
  • Location:Quebec

Posted 04 March 2018 - 09:04 AM

So the item works very well Roxanne and Jarno, thanks a lot! I added the effects found on the Demilich.itm to make the cre really invulnerable to status effects as well :)

 

But now that leads to another problem, divided in 2 things:

 

1. ActionOverride

 

As I said in my message, I want to remove the item. Here's the thing: ActionOverride works Roxanne, thanks for that I tested it... but not for the creature I want to use it on!

 

Here's my script. I edited "cowenf2.dlg" to remove the item after they hail you, and spawn their friend. The final action script looks like this:

 

IncrementGlobal("CowledWarning","GLOBAL",1)
CreateCreatureObject("COWENF1",Myself,0,0,0)
CreateCreatureObject("COWENF4",Myself,0,0,0)
CreateCreatureObject("COWENF3",Myself,0,0,0)
Enemy()
Wait(2)
ActionOverride("COWENF1",DestroyItem("D#INVULZ"))
ActionOverride("COWENF2",DestroyItem("D#INVULZ"))
ActionOverride("COWENF3",DestroyItem("D#INVULZ"))
ActionOverride("COWENF4",DestroyItem("D#INVULZ"))

I added the "wait" and the rest.

 

Now that should work, but it doesn't :(

 

I replaced "cowenf2" with Player1 and it successfully removed the same item from my main character. 

 

Why isn't it working with the cowled enforcers? :(

 

Now here's the interesting part: in NearInfinity, "cowenf2" works fine but "cowenf1", 3, and 4 don't work at all. NI returns an error, says they aren't valid "actors". I looked into their cre file and their "script name" is actually "cowenf01" , 02, and so on. When I input their script name the errors disappear. However, it still doesn't work. Item doesn't get removed.

 

My theory is that ActionOverrides seems to require as first argument an actor, which... is different from a cre file somehow?

 

Anyone knows what's going on here?

 

2. second problem: How to edit the action part of a dialog?

 

My second problem is basically that I don't know how to edit the "action" part of a dialog file. I read the weidu doc on dialog and action but it's too confusing for me. Is it even editable from my "setup-x.tp2" file?

 

Like, for testing purposes, how would I append "cowenf2.dlg" to add the lines I added above without the need to overwrite the whole file? (for good modding practice :D)

 

Thanks in advance guys, believe me I tried a lot of things and searched the forum, etc. The things I ask here is really if I just can't find a solution

 

edit: sorry for double post, I waited around 24 hours between the 2!


Edited by Daxtreme, 04 March 2018 - 09:08 AM.


#14 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Gibberling Poobah
  • 9677 posts
  • Gender:Not Telling

Posted 04 March 2018 - 09:20 AM

ActionOverride works on a creature's script name (or death variable) which is different than their file name. If you look in an editor at cowenf1.cre, you'll see that the script name is cowenf01, and that cowenf3 and cowenf4 also use scripts names with leading zeroes. IOW, change to this:

ActionOverride("COWENF01",DestroyItem("D#INVULZ"))
ActionOverride("COWENF2",DestroyItem("D#INVULZ"))
ActionOverride("COWENF03",DestroyItem("D#INVULZ"))
ActionOverride("COWENF04",DestroyItem("D#INVULZ"))

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.


#15 Daxtreme

Daxtreme
  • Members
  • 119 posts
  • Gender:Not Telling
  • Location:Quebec

Posted 04 March 2018 - 09:24 AM

Like I said, even when I did that

 

It didn't work :(

 

Worked for Player1 however. No idea why





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users