Request: Add new creature to a running encounter

Request a script to be made and one of us fine community members will make it for you.

Request: Add new creature to a running encounter

Postby youngneil1 » Fri Aug 02, 2013 5:46 am

It would be cool if we had a script for "summoning monsters", I.e. adding a new creature to an already running combat. That could be used as spell by player (Classic Summon Monster spell, would require e creature to creature combat, so that's for later I guess) or creature ability/spell ("Call reinforcement"). It could also be part of the global setup for an encounter, i.e. after 10 rounds a fresh wave of enemies appears. Any input is most welcome.
User avatar
youngneil1
Backer
Backer
 
Posts: 5078
Joined: Sat Dec 08, 2012 7:51 am

Re: Request: Add new creature to a running encounter

Postby James » Mon Oct 27, 2014 3:44 pm

I figured out how to do this. It took me 3 days! and I had to rely on some of Sinopip's code. I ran into graphics issues.


If you try to let the program itself redraw the window, it tries to Dispose of all graphics textures and throws a game-stopping error when it tries to dispose of the new creature's graphics, because they haven't been loaded yet. A Catch 22.

I had to re-initialize the entire Combat Window after adding the creature to the encounter. But, before doing so you have to dispose of all the player graphics only, because if you don't, when you re-initiate the whole thing, the player graphics get "Added" a second time breaking it.

Long story short - this spSummonMonster.cs spell works as a "Point" target spell. It requires an updated and compiled Game.cs where I wrote a function that will simply dispose of all PC graphics, which needs to be done before the whole combat window can be re-drawn. https://github.com/JamesManhattan/IceBl ... monMonster

What still needs to be done, is somehow giving a monster summoned by a player, a friendly Artificial Intelligence, so it starts attacking other creatures instead of the players.
Also in that A.I. script a check needs to be done if every other hostile creature has been killed, the summoned creature needs to unsummon itself or end the encounter.
Last edited by James on Mon Oct 27, 2014 11:53 pm, edited 1 time in total.
James
 
Posts: 11
Joined: Mon Sep 22, 2014 4:52 pm

Re: Request: Add new creature to a running encounter

Postby youngneil1 » Mon Oct 27, 2014 5:19 pm

So cool, James 8-) ! Big gratz on that one and many thanks for the effort. 3 days of brain killing tinkering, wow, good man :D !

This should allow for lots of very intersting stuff, likely adding prop graphics on the fly to combats as well (e.g. fire walls, poison clouds, etc.). Also, I guess the same trick could be used for adding props (e.g. as creature placeholders) to the adventure maps outside combat as well. Would make lots of stuff easier I did in the PLW project - again, really appreciated and many thanks for sharing :) !
User avatar
youngneil1
Backer
Backer
 
Posts: 5078
Joined: Sat Dec 08, 2012 7:51 am

Re: Request: Add new creature to a running encounter

Postby James » Mon Oct 27, 2014 11:54 pm

Hey adding Props was easy using the same code, but changing it to be props instead.

here is code to summon prop (as a spell)
https://github.com/JamesManhattan/IceBl ... monProp.cs
James
 
Posts: 11
Joined: Mon Sep 22, 2014 4:52 pm

Re: Request: Add new creature to a running encounter

Postby youngneil1 » Tue Oct 28, 2014 10:45 am

Nice one, seems that's a great principle at work there :) . Argh, hard to focus on IBAndroid and IBPc at the same time, but we will get there in timw ;) . Keep up the good work!
User avatar
youngneil1
Backer
Backer
 
Posts: 5078
Joined: Sat Dec 08, 2012 7:51 am


Return to Request a Script

Who is online

Users browsing this forum: No registered users and 1 guest

cron