[ian-reeds-games] Re: Script explanations wanted

  • From: Monkey <murtagh69.monkeys@xxxxxxxxx>
  • To: ian-reeds-games@xxxxxxxxxxxxx
  • Date: Sat, 28 Feb 2015 14:39:01 -0700

It just sounds kind of odd that it doesn't know about the units...even
if it is the ai that summons them in the first place. Maybe that's
just me.


To your question about why I don't make changes to the unit file...
Partially out of laziness--I don't want to make different units just
for summoning purposes because then I'd have to go through each of my
skills and see if I have to add them to the not_useable_on= flag--and
partially because there would be differences, depending on who summons
the unit. Like, if I were to have a necromancer summoning a wraith it
wouldn't be modified, but if the wraith king were to summon one then
the new unit would be granted a lot of extra hp so it wouldn't die in
two or three hits. Same with elementals; if I have them on the map
naturally, they would last for as long as their hp is above zero, but
if they are summoned then they will only last a certain amount of
turns before they die (like the ones from the Demon Wars pack).
Probably not a good enough reason to ask for this, I know, but it's worth a try.

On 2/28/15, Craig Brett <dmarc-noreply@xxxxxxxxxxxxx> wrote:
> After a unit performs a skill, though, it has no idea, currently, about
> any summoned units.
>
> Obviously we could change that if necessary, then someone else could
> script that up.
>
> Could I ask, though, why? Why not just make the changes the effect would
> have on the unit file itself.
>
> On 28/02/2015 20:07, Monkey wrote:
>> I thought it would, if you had the effect occur after the skill and
>> therefore after the unit is placed, then it could be placed on the
>> newly created unit...but I know nothing about scripting, so guess not
>> hahaha.
>>
>> On 2/28/15, Craig Brett <dmarc-noreply@xxxxxxxxxxxxx> wrote:
>>> It wouldn't, no, as it's not designed to.
>>>
>>> Having an after_perform script to do this wouldn't work either, as it
>>> doesn't have access to the newly created unit to put the effect on it.
>>>
>>> On 28/02/2015 18:02, Monkey wrote:
>>>> Summonee. Placing the effect on the summoner is easy, I'd just use the
>>>> self_effects= flag. But effects= doesn't seem to work on the summonee
>>>> when I place it in the skill.
>>>>
>>>> On 2/28/15, Craig Brett <dmarc-noreply@xxxxxxxxxxxxx> wrote:
>>>>> Depends, do you want the effect on the summoner or the summonee?
>>>>>
>>>>> On 28/02/2015 17:56, Monkey wrote:
>>>>>> Could you just use after_perform_skill and ignore the unit one then?
>>>>>> Wouldn't the effect still be applied after I summon a unit?
>>>>>>
>>>>>> On 2/28/15, Craig Brett <dmarc-noreply@xxxxxxxxxxxxx> wrote:
>>>>>>> It could definitely be done already with after_create_unit, yeah.
>>>>>>>
>>>>>>> The problem is, distinguishing there if its been a summoned unit or
>>>>>>> a
>>>>>>> normally placed unit.
>>>>>>>
>>>>>>> On 28/02/2015 17:24, Monkey wrote:
>>>>>>>> About the summon thing. I was searching the scripting guide and was
>>>>>>>> wondering if it was possible for a script to be made to add an
>>>>>>>> effect
>>>>>>>> to a unit *after* it has been summoned, using one or both of these:
>>>>>>>> after_create_unit after_perform_skill
>>>>>>>> I don't know javascript, otherwise I'd love to try my hand at
>>>>>>>> creating
>>>>>>>> my
>>>>>>>> own...
>>>>>>>>
>>>>>>>> On 2/27/15, Carlos Macintosh <sleepio1@xxxxxxxxxxx> wrote:
>>>>>>>>> THe current percent inflict can be added fairly easily to items;
>>>>>>>>> it
>>>>>>>>> would work only for items you can use, not items you can equip.
>>>>>>>>> THe music changing thing is probably not feasible right now
>>>>>>>>> because
>>>>>>>>> terrain isn't currently exposed to scripters.
>>>>>>>>>
>>>>>>>>> about the summon thing, I know this is probably not what you want,
>>>>>>>>> but
>>>>>>>>> you could create a copy of the unit that had the attributes you
>>>>>>>>> wanted,
>>>>>>>>> like limited lifespan or higher hp. You could use friendly type to
>>>>>>>>> make
>>>>>>>>> it look the same as the normal unit.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 2/27/2015 12:08 PM, Monkey wrote:
>>>>>>>>>> Aha, thank you for explaining those!
>>>>>>>>>> I'm actually curious now if there are other flags that exist but
>>>>>>>>>> aren't in the map creation guide...because there's that inherits=
>>>>>>>>>> one
>>>>>>>>>> that I was wondering about before, now the friendly_type= flag.
>>>>>>>>>> For the current_percent_inflict, would you please consider
>>>>>>>>>> modifying
>>>>>>>>>> it for the next release so that you can put that down for items
>>>>>>>>>> as
>>>>>>>>>> well?
>>>>>>>>>> This is related to the music changing...is it possible to create
>>>>>>>>>> a
>>>>>>>>>> script allowing the music to change when you get to a certain
>>>>>>>>>> terrain,
>>>>>>>>>> or area on the map? Or when a certain unit becomes visible to
>>>>>>>>>> you?
>>>>>>>>>> I
>>>>>>>>>> think it would be cool if when I reached a certain point in my
>>>>>>>>>> first
>>>>>>>>>> level the music would change since there's a boss battle.
>>>>>>>>>>
>>>>>>>>>> And this is non-script related. Is there a way to use a summon
>>>>>>>>>> skill
>>>>>>>>>> and at the same time give the unit more hp than it would normally
>>>>>>>>>> have, or an effect that would cause it to die after a certain
>>>>>>>>>> amount
>>>>>>>>>> of time? I tried playing around with it, but I haven't had any
>>>>>>>>>> success
>>>>>>>>>> yet.
>>>>>>>>>>
>>>>>>>>>> On 2/27/15, Carlos Macintosh <sleepio1@xxxxxxxxxxx> wrote:
>>>>>>>>>>> friendly_type works. You can use this on units and structures to
>>>>>>>>>>> change
>>>>>>>>>>> what the user hears when focusing on the unit with the cursor or
>>>>>>>>>>> hitting
>>>>>>>>>>> f4 for information. A good example of when to use it is if you
>>>>>>>>>>> have
>>>>>>>>>>> several units that are all of the same type but have different
>>>>>>>>>>> skill
>>>>>>>>>>> sets, such as if you had, say, a mage, and then in the next map
>>>>>>>>>>> you
>>>>>>>>>>> had
>>>>>>>>>>> the same mage but he now knew a new spell, you could use
>>>>>>>>>>> friendly_type
>>>>>>>>>>> to make the mages look the same, because you would otherwise
>>>>>>>>>>> have
>>>>>>>>>>> to
>>>>>>>>>>> make their fileames sound the same, and that's just a lot of
>>>>>>>>>>> trouble
>>>>>>>>>>> considering the variety of synthesizers and screen readers
>>>>>>>>>>> people
>>>>>>>>>>> use.
>>>>>>>>>>> So basically, friendly type is nice insurance for that. It is
>>>>>>>>>>> also
>>>>>>>>>>> useful just to make a unit name shorter, or as a way to disguise
>>>>>>>>>>> what
>>>>>>>>>>> units really are without confusing you as the map creator.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>
>>>
>>>
>>
>
>
>


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

Other related posts: