Will o' the wisp

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Granamir
Posts: 202
Joined: Wed Jan 07, 2015 7:19 pm

Will o' the wisp

Post by Granamir »

I'v made an object will o wisp, if u need u'r free to take it here:
https://onedrive.live.com/redir?resid=D ... lder%2czip
It's moving around center of a tile turning on and off.
Instruction are inside zip file.

If u do not want to use it in your dungeon better do not read more.
SpoilerShow
It follows party when turned off, if far not more than 1 tile.
When it's lit champions lose 100 exp each second, per wisp.
Can be turned in a killable object, but i didn't tested it.
If u nedd some clarification ask freely.
User avatar
Zo Kath Ra
Posts: 944
Joined: Sat Apr 21, 2012 9:57 am
Location: Germany

Re: Will o' the wisp

Post by Zo Kath Ra »

Can you upload a screenshot, or better yet, a video?
SpoilerShow
If you kill the wisp, do you get the lost exp back?
Granamir
Posts: 202
Joined: Wed Jan 07, 2015 7:19 pm

Re: Will o' the wisp

Post by Granamir »

Zo Kath Ra wrote:Can you upload a screenshot, or better yet, a video?
SpoilerShow
If you kill the wisp, do you get the lost exp back?
I added 2 videos and one image, u can download them from same folder/link u can see up.
SpoilerShow
Nope, u don't get lost exp back. Since i didn't tested them as killable i didn't keep trace of exp they stole. Btw it's not very difficult if u know a little of programmin. I already have table element (but i didn't use it), it is: 'datiFuoco[nFuocoFatuo]["dannoExp"] = 0'.
U just need to add code to store stolen exp in there. Function that makes damage is 'function danniExp()', u can find i at end of file. U can simply add your code after 'party.party:getChampion(i):gainExp(-100)'.
And make some tests abviously.

Btw i prefer keeping them as they are and eventualy give fixed exp when party complete that room. If a palyer is good can earn exp, if not so good loses some exp less.
kelly1111
Posts: 349
Joined: Sun Jan 20, 2013 6:28 pm

Re: Will o' the wisp

Post by kelly1111 »

In your video you have a raised dungeon floor (between the pillars) .. how did you do that?
and the will o the wisp look cool !
Granamir
Posts: 202
Joined: Wed Jan 07, 2015 7:19 pm

Re: Will o' the wisp

Post by Granamir »

Thank you.
I raised it with heightmap, but monsters get higher than floor so i now changed with an invisible platform and floor tile, rised with ':setWorldPositionY(1.3)'
kelly1111
Posts: 349
Joined: Sun Jan 20, 2013 6:28 pm

Re: Will o' the wisp

Post by kelly1111 »

Granamir wrote:Thank you.
I raised it with heightmap, but monsters get higher than floor so i now changed with an invisible platform and floor tile, rised with ':setWorldPositionY(1.3)'
Ok, but I still dont understand how you textured the sides of your raised platform/floor. I can look throught the world if I do that ...
Can you please explain a bit more?
Granamir
Posts: 202
Joined: Wed Jan 07, 2015 7:19 pm

Re: Will o' the wisp

Post by Granamir »

kelly1111 wrote:
Granamir wrote:Thank you.
I raised it with heightmap, but monsters get higher than floor so i now changed with an invisible platform and floor tile, rised with ':setWorldPositionY(1.3)'
Ok, but I still dont understand how you textured the sides of your raised platform/floor. I can look throught the world if I do that ...
Can you please explain a bit more?
Sure,
floor tile i used is: "dungeon_floor_dirt_01"
for sides i used "dungeon_ceiling_wall" with ":setWorldPositionY(-3.2)".

Btw using set world position and sutile offset pay attention to "minimalSaveState" in definition of object u use, if they have = true have to copy them and set as false, otherwise after u save/load they come back to standard position.
kelly1111
Posts: 349
Joined: Sun Jan 20, 2013 6:28 pm

Re: Will o' the wisp

Post by kelly1111 »

thanks alot that worked

Do you know if the dungeon/system will take a big performace hit if you use alot of setworldposition in your dungeon
or does it not matter for the engine / performance ?
Granamir
Posts: 202
Joined: Wed Jan 07, 2015 7:19 pm

Re: Will o' the wisp

Post by Granamir »

kelly1111 wrote:thanks alot that worked

Do you know if the dungeon/system will take a big performace hit if you use alot of setworldposition in your dungeon
or does it not matter for the engine / performance ?
U'r welcome
As i know (still doesn't tested) it affect only load/save time.
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Will o' the wisp

Post by minmay »

I don't think it will affect that either, actually. Just make sure to never use it on assets that are defined with minimalSaveState.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Post Reply