On Sat, Oct 1, 2011 at 3:16 AM, Ralph Versteegen <[email protected]> wrote:
> On 1 October 2011 11:41, James Paige <[email protected]> wrote:
>> On Fri, Sep 30, 2011 at 02:50:51PM -0700, Adam Perry wrote:
>>> Here's a patch adding a bunch of new commands. With this patch, I'll
>>> no longer need the non-canonical parameters for read enemy data, so
>>> you can proceed with your crazy plan.
>
> Wow, great!
>
> BTW, do you prefer to be credited as Mogri or Adam Perry? James used
> 'Mogri' for the last patch, so there's a mix of the two in
> whatsnew.txt
>
>> For some reason the plotdict.xml and yetmore.bas parts don't want to
>> apply... which is strange, because I can't see any obvious problem.
>
> The patch claims to be against revisions 190 and 191! Also, it
> includes the door commands again in the patch to plotdict.xml
>
>> Anyway, I'll figure it out, and test the patch.
>
> The attack commands don't subtract 1 from the attack ID.
>
> Several of the commands which take only one argument are declared as
> taking two in plotscr.hsd.
>
> It's worth noting that that loadenemydata defaults to reading from the
> original DT1 lump instead of the copy that writeenemydata writes. This
> is OK since you shouldn't be using writeenemydata on any of these
> things anyway, but we might as well fix those.
>
> Use bound_arg instead of in_bound when checking script arguments so
> that you get told if you pass a bad arguments. Likewise, explicitly
> pass 5 as the errorlevel to bound_arg (though if we implement my plan
> for script errors in my other post, it'll matter a lot less)
>
> I think "read attack item" should return the nth specified item rather
> than the item in the nth slot. (Maybe this could be handled in
> loadattackdata.) Also, it's broken because you need to subtract 1 from
> the .id member (and our internal item adding/removing functions pass
> around ID+1 as well, ugh!).
>
Many of the plotscripting commands pass around ID+1 as well, if I'm
not mistaken. If we're consistently wrong, that's kind of like being
right.

>>> Functions added:
>>> +527,enemyelementalresistasint,2,-1,0 # percentage damage taken from
>>> an element rounded to an int (enemy, element)
>>> +528,readattacktargetclass,1,0    #returns the target class (ally,
>>> enemy, etc.) of the given attack
>>> +529,readattacktargetsetting,1,0  #returns the target setting
>>> (focused, spread, etc.) of the given attack
>>> +530,readattackdamageequation,1,0 #returns the damage equation
>>> (normal, sharp, etc.) of the given attack
>>> +531,readattackextradamage,1,0    #returns the extra damage modifier
>>> of the given attack
>>> +532,readattackitem,2,0,0         #returns item ID+1 of the given
>>> attack's nth item cost (attack, n [0..2])
>>> +533,readattackitemquantity,2,0,0 #returns item quantity of the given
>>> attack's nth item cost (attack, n [0..2])
>>> +534,readattackchain,2,0,0        #returns attack ID+1 of the given
>>> attack's chain (attack)
>>> +535,readattackchainrate,2,0,0    #returns chain rate of the given
>>> attack's chain (attack)
>>> +536,readattackelsechain,2,0,0    #returns attack ID+1 of the given
>>> attack's else chain (attack)
>>> +537,readattackelsechainrate,2,0,0#returns chain rate of the given
>>> attack's else chain (attack)
>>> +538,readattackinsteadchain,2,0,0     #returns attack ID+1 of the
>>> given attack's chain (attack)
>>> +539,readattackinsteadchainrate,2,0,0 #returns chain rate of the given
>>> attack's chain (attack)
>>
>> The above all sounds fine to me
>>
>>> +540,readenemynormalattack,2,0,0  #returns the nth attack ID+1 of
>>> given enemy's normal attack set (id, n [0..4])
>>> +541,readenemyaloneattack,2,0,0   #returns the nth attack ID+1 of
>>> given enemy's alone attack set (id, n [0..4])
>>> +542,readenemydesperationattack,2,0,0 #returns the nth attack ID+1 of
>>> given enemy's desperation attack set (id, n [0..4])
>>
>> One thing about these, after the Plan for enemy AI improvements is done,
>> these will have to be converted to work like this internally:
>>
>> * Search through all of the gambits attached to this enemy
>> * if searching for "alone", return attacks form the first gambit that
>> uses the condition "Formation contains < 2 allies"
>> * if searching for desperation, return attacks from the first gambit
>> with the condition "Self stat:HP < n%"
>> * if searching for "normal"... Dang. I guess the last gambit in the list
>> is what old enemies would have their "Normal" set converted to, but
>> there is a good chance that will often be wrong for "normal" for enemies
>> created after the gambit system is in... but by that time this command
>> will be clearly marked as being for backcompat only, so i guess that
>> doesn't matter much.
>>
>> You can see why I get wary about new commands sometimes :)
>
> For similar reasons, I'm iffy about the damage-equation commands. I'd
> like to completely overhaul the attack damage calculation and its
> presentation in the editor. Just thinking about it makes me want to
> start immediately. Firstly, extra damage. Maybe this should be changed
> (in the attack editor) to a (floating point?) multiplier, so "Extra
> damage: 10%" becomes "Damage multiplier: 110%". I've always found the
> presentation of the "100 damage" and "100% of Max/Current" options
> weird.
>
> Also, we wanted to generalise blunt/normal/sharp damage by letting you
> choose the multiplier on both the attack and defense stats (and let
> you add together multiple attack stats, each with its own
> multiplier?). In fact, this is something I wanted to do pretty soon;
> I've been meaning to do it for months. So I'm not keen on adding "read
> attack damage equation" if it'll be obsolete and useless by the next
> release, how about "read attack damage stat multiplier [as int?]" and
> "read attack defense stat multiplier [as int?]". If we wanted multiple
> damage/defense stats which are summed, I guess we can tack on an
> argument for the nth term in the equation later.
>
>  I'd like the menu to look like:
>
>
> Example 1:
>
> ==Damage Equation==
> Attack damages target stat  [Other options include curing and setting the 
> stat]
> Target Stat: Defender HP  [Other options include global variables and
> stun/poison/regen registers, and elemental resists]
> Base ATK Stat: Attacker Atk
> ...multiplier: 100%
> Base DEF Stat: Defender Def
> ...multiplier: 50%
> Total multipler: 110%
>
> (The bottom of the screen previews the equation:)
> Damage = 110% * (Attacker Atk - 50% * Defender Def)
> If Damage < 1 Then Damage = 1
> Target HP -= Damage
>
> Example 2:
>
> ==Damage Equation==
> Attack sets target stat
> Target Stat: Defender HP
> Base ATK Stat: Defender Max HP
> ...multiplier:  1%
> Base DEF Stat: None
> Total multipler: 100%
>
> Target HP = 1% * Target Max HP
>
>
> Hey James, can editedit do this? :) I'm guessing no; I'll whip up a prototype.
>
>> ---
>> James
>>
>>> It's a lot bigger and yet much more straightforward than yesterday's patch.
>>>
>>>
>>> On Fri, Sep 30, 2011 at 1:15 PM, Adam Perry <[email protected]> wrote:
>>> >
>>> > On Fri, Sep 30, 2011 at 1:11 PM, Mike Caron <[email protected]> wrote:
>>> > > On 30/09/2011 4:05 PM, James Paige wrote:
>>> > >>
>>> > >> On Fri, Sep 30, 2011 at 12:46:49PM -0700, Adam Perry wrote:
>>> > >>>
>>> > >>> Oh shooooooot, I was thinking that "read attack data" was an actual 
>>> > >>> thing
>>> > >>> :(
>>> > >>
>>> > >> Nope, I was confused if I said it was. Read enemy data exists, but was 
>>> > >> a
>>> > >> bad idea.
>>> > >>
>>> > >>> Can it be an actual thing? Please? I will implement it all by myself.
>>> > >>
>>> > >> No. a "read anything data" command of any kind is a bad idea, and I
>>> > >> deeply regret any existing command that works that way.
>>> > >>
>>> > >> A command that loads a specific piece of data is tolerable, because the
>>> > >> underlying data format can change without requiring the plotscripting
>>> > >> command to do unfortunate backcompat mumbo-jumbo.
>>> > >
>>> > > Adam, just to clarify, the "read enemy data" command is the moral 
>>> > > equivalent
>>> > > of doing something like this:
>>> > >
>>> > >   void* theEnemy = ...;
>>> > >   int enemyHP = *(((int*)theEnemy) + 23); //I know the HP is 23 *
>>> > > sizeof(int) bytes in, and assume it will never change
>>> > >
>>> > > I think it seemed like a good idea at the time, but we all know that
>>> > > hindsight is 20:20.
>>> > >
>>> > > To maintain compatability in the future, the command will have to 
>>> > > change to
>>> > > something like:
>>> > >
>>> > >   IF index = 23 THEN
>>> > >     RETURN enemy.HP
>>> > >   ELSE IF index = 12 THEN
>>> > >     RETURN enemy.sprite
>>> > >   ELSE ...
>>> >
>>> > We juggle live grenades here. It is what we do.
>>> >
>>> > >>> Anyway, the only actual "read enemy data" I am using is the command
>>> > >>> list.
>>> > >>
>>> > >> The command list?
>>> > >> Oh, the attacks that an enemy can do?
>>> > >>
>>> > >> Hrmm... That is going to change massively when I do
>>> > >> http://rpg.hamsterrepublic.com/ohrrpgce/Plan_for_enemy_AI_improvements
>>> > >>
>>> > >>> I will expose enemy elemental resists via a separate command
>>> > >>> altogether.
>>> > >>
>>> > >> Yeah, if it is a separate command it should be okay :)
>>> > >>
>>> > >> ---
>>> > >> James
>>> > >>
>>> > >>> On Fri, Sep 30, 2011 at 11:39 AM, Adam Perry<[email protected]>  
>>> > >>> wrote:
>>> > >>>>
>>> > >>>> Semi-relatedly, I'm also planning to add a command to expose 
>>> > >>>> elemental
>>> > >>>> resistances for enemies. I'm trying to use
>>> > >>>> http://hamsterrepublic.com/ohrrpgce/nightly/ohrrpgce-source-nightly.zip,
>>> > >>>> though, and it doesn't actually have yesterday's changes. (I'd use 
>>> > >>>> SVN
>>> > >>>> directly, but I'm running into proxy issues.)
>>> > >>>>
>>> > >>>> More relatedly, are there plans to change the inner workings of read
>>> > >>>> enemy data? This doesn't matter too much for a potential "enemy
>>> > >>>> elemental resist as int" implementation, which can be changed if the
>>> > >>>> other is, but it might affect my plans for the script I'm working on.
>>> > >>>>
>>> > >>>>
>>> > >>>> On Fri, Sep 30, 2011 at 9:23 AM, Adam Perry<[email protected]>  
>>> > >>>> wrote:
>>> > >>>>>
>>> > >>>>> On Fri, Sep 30, 2011 at 8:53 AM, James 
>>> > >>>>> Paige<[email protected]>
>>> > >>>>>  wrote:
>>> > >>>>>>
>>> > >>>>>> On Thu, Sep 29, 2011 at 08:13:10PM -0700, Adam Perry wrote:
>>> > >>>>>>>
>>> > >>>>>>> On Thu, Sep 29, 2011 at 7:56 PM, Ralph 
>>> > >>>>>>> Versteegen<[email protected]>
>>> > >>>>>>>  wrote:
>>> > >>>>>>>>
>>> > >>>>>>>> On 30 September 2011 08:34, James Paige<[email protected]>
>>> > >>>>>>>>  wrote:
>>> > >>>>>>>>>
>>> > >>>>>>>>> On Thu, Sep 29, 2011 at 11:55:26AM -0700, Adam Perry wrote:
>>> > >>>>>>>>>>
>>> > >>>>>>>>>> On Thu, Sep 29, 2011 at 11:26 AM, Adam Perry<[email protected]>
>>> > >>>>>>>>>>  wrote:
>>> > >>>>>>>>>>>
>>> > >>>>>>>>>>> I'd like to add in a few more plotscripting commands, but I'm 
>>> > >>>>>>>>>>> not
>>> > >>>>>>>>>>> sure
>>> > >>>>>>>>>>> what files need to be changed. The obvious one is plotscr.hsd,
>>> > >>>>>>>>>>> and I'm
>>> > >>>>>>>>>>> sure I can figure out what to do there, but what other files 
>>> > >>>>>>>>>>> are
>>> > >>>>>>>>>>> involved?
>>> > >>>>>>>>>>>
>>> > >>>>>>>>>>> I'm not looking to do anything complicated; just 
>>> > >>>>>>>>>>> getters/setters
>>> > >>>>>>>>>>> for
>>> > >>>>>>>>>>> things like door position and enemy attacks.
>>> > >>>>>>>>>>>
>>> > >>>>>>>>>>
>>> > >>>>>>>>>> Actually, some research shows that enemy attacks are already
>>> > >>>>>>>>>> exposed
>>> > >>>>>>>>>> (albeit via the arcane "read enemy data" command). So that's 
>>> > >>>>>>>>>> one
>>> > >>>>>>>>>> down.
>>> > >>>>>>>>>
>>> > >>>>>>>>> Yes, the "read enemy data" commands are unfortunately arcane, 
>>> > >>>>>>>>> and
>>> > >>>>>>>>> will
>>> > >>>>>>>>> be a backcompat pain in the future.
>>> > >>>>>>>>
>>> > >>>>>>>> I had been thinking recently: let's not support 
>>> > >>>>>>>> read/writeenemydata
>>> > >>>>>>>> for anything other than the provided constants. If you haven't 
>>> > >>>>>>>> used
>>> > >>>>>>>> them, and I haven't used them, and Mogri hasn't used them, then 
>>> > >>>>>>>> we
>>> > >>>>>>>> can
>>> > >>>>>>>> be nearly sure that noone has.
>>> > >>>>>>>>
>>> > >>>>>>> But I just wrote a script using them extensively...
>>> > >>>>>>
>>> > >>>>>> Did you use any data index numbers other than the 11 documented in
>>> > >>>>>>
>>> > >>>>>> http://hamsterrepublic.com/ohrrpgce/docs/plotdict.xml#about-readenemydata
>>> > >>>>>> ?
>>> > >>>>>
>>> > >>>>> Here's the list of undocumented things I'm using so far:
>>> > >>>>>   3, attackdata:target class
>>> > >>>>>   4, attackdata:target setting
>>> > >>>>>   12, attackdata:chain
>>> > >>>>>   13, attackdata:chain rate
>>> > >>>>> I am also likely to use several more since I'm essentially pulling 
>>> > >>>>> in
>>> > >>>>> attack data to use in a custom battle system.
>>> > >>>>>
>>> > >>>>> I'm okay rewriting this part if you have a somewhat immediate plan 
>>> > >>>>> for
>>> > >>>>> exposing attack data.
>>> > >>>>>
>>> > >>>>
>>> > >>> _______________________________________________
>>> > >>> Ohrrpgce mailing list
>>> > >>> [email protected]
>>> > >>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>> > >>>
>>> > >> _______________________________________________
>>> > >> Ohrrpgce mailing list
>>> > >> [email protected]
>>> > >> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>> > >
>>> > >
>>> > > --
>>> > > - Mike Caron
>>> > > _______________________________________________
>>> > > Ohrrpgce mailing list
>>> > > [email protected]
>>> > > http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>> > >
>>
>>
>>> _______________________________________________
>>> Ohrrpgce mailing list
>>> [email protected]
>>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>
>> _______________________________________________
>> Ohrrpgce mailing list
>> [email protected]
>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>>
> _______________________________________________
> Ohrrpgce mailing list
> [email protected]
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to