[ian-reeds-games] Re: question about transformation script

  • From: Sharni-Lee Ward <sharni-lee.ward@xxxxxxxxxxx>
  • To: "ian-reeds-games@xxxxxxxxxxxxx" <ian-reeds-games@xxxxxxxxxxxxx>
  • Date: Sat, 13 Jun 2015 01:16:19 +0930

The only solution to this that I've found is to make the skill not useable on
animals, birds, cities, starmages (because they're immune to lesser mages'
spells) and a few other things. I keep having to add to the list, but that's
how I handled it. Some skills I left able to be used on animals like the one
that turns something into porcelain, but I fear that will be hard to revert if
I get it somewhere that it can be reverted.

And Craig, I've tested this feature. Thank you so much! Not only do I now have
one skill where I had seven before for two of my evil sorcerers, but my
Shadowphane (a creature who turns itself into other forms to prevent it from
being left vulnerable) now has one shapeshifting skill where it had four, and
there is no need for first, second and third stages that have the points
necessary to shift into various forms set to 0. Beating that map just got a bit
tougher. :D

Date: Fri, 12 Jun 2015 00:42:52 -0600
Subject: [ian-reeds-games] Re: question about transformation script
From: murtagh69.monkeys@xxxxxxxxx
To: ian-reeds-games@xxxxxxxxxxxxx

Ah, alright.
I could just switch it to tile for now. Not a problem.

And it works perfectly for me!
The only thing I can think of mentioning is ... is there a way to
prevent a unit from being "transformed" into a form that it's already
in? So say I want one possibility to be a snake. But if the unit is
already a snake, I don't want the script to pick snake from the list
when using the skill on that unit, for obvious reasons.

On 6/12/15, Craig Brett <dmarc-noreply@xxxxxxxxxxxxx> wrote:
I wouldn't be opposed to it. Though I'm not rushing to do it either. There
are at least work arounds for now. It'll happen sometime.

No idea without looking at it. It doesn't use the empty tile property when
looking for cursable tiles, as a guess off the top of my head. And I don't
know why you're getting that message either. I don't get this problem.

I'm guessing after me getting this feature out there, no one's had chance to
use it yet? Or is it that it doesn't work?

On 12/06/2015 02:03, Monkey wrote:
On the topic of the AI.
Why does it try to use skills labeled "empty_tile" on occupied tiles?
Is it because I also have the flag "ai_tile_curse" set?
Oh, and I keep getting the "there is a bug in the artificial
intelligence. It was trying to perform move" message. Sometimes other
skills, but usually my move one. Still no idea as to what's causing
that.

On 6/11/15, Monkey <murtagh69.monkeys@xxxxxxxxx> wrote:
Ah, OK. Thanks for clearing that up then!

And to bring up something that was mentioned by another user in the
past and that you may or may not have seen, would you be opposed to
adding a flag to make units immune to your move_other_unit scripts?
Personally I'm not in need of it *yet*, but others could be, judging
by the fact that it was brought up.

On 6/11/15, Craig Brett <dmarc-noreply@xxxxxxxxxxxxx> wrote:
Ah right. Yeah it's an engine issue. If it's the one I'm thinking of.

On 12/06/2015 01:39, Monkey wrote:
I meant for script updates, oops. Not sure if the at_zero thing was a
script or engine issue, hence my question.

On 6/11/15, Craig Brett <dmarc-noreply@xxxxxxxxxxxxx> wrote:
No. This feature was implemented and improved using script. It's not
a
new version of TB.

On 11/06/2015 19:59, Monkey wrote:
This is the latest for everything, right? Like, the at_zero
transformation bug I brought up a while ago is fixed in this one
too?

On 6/11/15, Craig Brett <dmarc-noreply@xxxxxxxxxxxxx> wrote:
Okay, how's this?

Scripts link:
https://dl.dropboxusercontent.com/u/5405418/Craig%20Brett.zip
Documentation (in case you want/need it):
https://dl.dropboxusercontent.com/u/5405418/Craig%20Brett%20Documentation.zip

Tl;Dr version of the change so you don't have to look at the docs.

|script_flags
transforms_into warrior/fire_mage
death_transformation zombie/skeleton

Let me know how it works for you guys.

On 11/06/2015 19:36, Craig Brett (Redacted sender
craigbrett17@xxxxxxx
for DMARC) wrote:
Nah. You've already got an array of things there, the / separated
list
of strings. In this case, the array won't be any longer than it
needs
to be, so you can just pick a random number for the length of that
array.

Essentially, just like that function Monkey posted.

On 11/06/2015 19:14, Kyle Davis wrote:
i guess i got it completely wrong and i am glad to hear that it
is
not as complicated as i thought. i was thinking that you will
need
to
take the number of effects in the flags and make it into a range
like
1r3, 1 being the firsteffect and 2 being the second effect and so
on
and taking that range and return it to shared calculate flag
where
it
would pick a random number in the range and returning it back to
apply effect flag where it would be apply.

On 6/10/2015 11:40 PM, Monkey wrote:
Computer? Derp, oops. Sorry about that.

And if the slashes are what's decided, I already modified your
randomSelectString for one of my scripts because the "|" would
have
looked a bit awkward...as I think we have discussed in the past.
function slashString(original) {
if (original.indexOf("/") == -1)
return original;
var choices = original.split('/');
var randomIndex = Math.round(Math.random() * (choices.length -
1));
var pick = choices[randomIndex];
return pick;
}
Not much of a change, of course. So credit still definitely goes
to
you.
Just so we both don't have the same thing with a different
function
name... It would be a bit pointless, aha.

On 6/10/15, Craig Brett <dmarc-noreply@xxxxxxxxxxxxx> wrote:
It wouldn't be the AI choosing anything, it'd be the computer.
There's a
subtle difference. I'm not doing any funky business with a
range,
though, that sounds like an unnecessary hassle.

Yeah, I could give that a look. I'd probably just extend the
existing
transforms_into scripts. If that's what you're thinking. Having
them
take random arguments would be easy. I'd probably have it so
you
could do:

transforms_into cat/dog/bird

Or maybe

transforms_into cat|dog|bird

Both read alright to me and both mean randomly pick one, slash
is
more
gramatically correct but computer speak wise, "|" means "or".
Any
strong
preference?

On 11/06/2015 06:04, Monkey wrote:
Wait, what do you mean with range? I'm not sure we're on the
same
page
here.
My understanding is that you want the AI to choose a random
effect
from a list. That's simple enough to create.

On 6/10/15, Kyle Davis <kyles.supernova@xxxxxxxxx> wrote:
i don't know how to achieve this so far what i learned is
that
you will
need to sepperate each effects and then have each effects
hashed
as
integers for instence the first effect in the line would be 1
and
the
next would be 2 and so on and then take the integer values
and
make it
into a range like 1r2 or 1r3 and etc then put it through the
shared
calculate flag to be calculated at which it would randomly
pick
any
number in the range and then send it to shared apply effects
flag
and
have flags to apply this effect to either a unit and or tile
but
i could
be completely wrong about it, it seems to me that it should
go.

On 6/10/2015 2:45 PM, Monkey wrote:
A random effects script is very easy to do, I think. *shrug*

On 6/10/15, Kyle Davis <kyles.supernova@xxxxxxxxx> wrote:
if that is so i guess i would try maybe having
transformations
on
different 0 duration effects a course this would require
that
tb has
the
capability of having random effects flags, i am remembering
that it
was
mentioned a few months ago and maybe having it added on in
later
versions.

On 6/10/2015 2:22 PM, Monkey wrote:
I'm pretty sure that's possible, although I'm not sure if
he's
going
to want to add that.

On 6/10/15, Kyle Davis <kyles.supernova@xxxxxxxxx> wrote:
i wonder is it possible to have random unit type
transformations for
instence i have a curse that could turn a unit into a
random
creature
lets say i have cat, dog, and bird as the argument and
when
i
have
it
cast on a unit the game engine will randomly selects one
of
the unit
type i have placed in it and then turn that unit into the
randomly
selected unit type



--
-Mew
__________
http://www.savethefrogs.com/




--
-Mew
__________
http://www.savethefrogs.com/

Other related posts: