Changes between Initial Version and Version 1 of Ticket #44


Ignore:
Timestamp:
Apr 30, 2013, 1:59:10 AM (12 years ago)
Author:
Iritscen
Comment:

Re: "three" -> "four", I can count, really. But I originally wrote the glass-breaking to have three steps :-)

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #44

    • Property Priority majorcritical
  • Ticket #44 – Description

    initial v1  
    2020See how simple that can look with standard procedural syntax?  Now technically we're missing a 'for' loop there, but we could easily just ask for XmlTools to treat 'if' statements as a request to iterate over all the named elements.
    2121
    22 But let's take this a step further with a much-less hypothetical scenario.  Let's say that I want to add glass-breaking particles to all TRAMs (because I do).  Gumby actually had to write his own tool to do this for the 2009 AE because it requires a conditional syntax ''and'' variables.  This mod consists of three parts:
     22But let's take this a step further with a much-less hypothetical scenario.  Let's say that I want to add glass-breaking particles to all TRAMs (because I do).  Gumby actually had to write his own tool to do this for the 2009 AE because it requires a conditional syntax ''and'' variables.  This mod consists of four parts:
    23231. The glass-breaking particle. This is the easiest part, we just include the file BINA3RAPglass_break.oni in the mod, no patching needed.
    24 2. A list of attacks to affect.  This could be based on a pattern like "*punch*", "*kick*", etc., but there will have to be a list of names or patterns.
    25 3. Now we need to let Oni know that a character can create this particle. We do this by adding this to their ONCC's ONCP array:
     242. A list of attacks to affect.  This could be based on a pattern like "*punch*", "*kick*", etc., but there will have to be a list of names or patterns.  This is currently able to be handled by the AEI's file name-matching of the .oni-patch files, so we can leave that alone, although it does limit the kind of pattern-matching we can do.
     253. Now we need to let Oni know that a character can create this particle. We do this by adding this to their ONCC's ONCP array this element:
    2626{{{
    2727<ONCPParticle>
     
    3131</ONCPParticle>
    3232}}}
    33 Preferably, we only do this if this ONCPParticle has not been added already.  Not sure if duplicating the listing does any harm, though, so let's move on.
     33Just a standard @ADDTO command, here.  Preferably, we only do this if this ONCPParticle has not been added already.  Not sure if duplicating the listing does any harm, though, so let's move on.
    3434
    35354. We add the actual emission of the particle to attacks.  Here's where it gets tricky.  Here's the relevant part of a TRAM (Barabas' Earthquaker):
     
    5959}}}
    6060So let's count the ways that this isn't possible with XmlTools:
    61 A. We need to read and save into memory the Start and End frames from the Attack, otherwise the character will break the glass at the distance of his attack's Extents before his fist/whatever gets anywhere near the glass.
    62 B. We need to read, parse and save the list of Bones from the Attack array. Otherwise we'd have to guess which bones to add the particle to, and if we guessed wrong, a character standing near glass would break it with the wrong parts of his body. Also, we'd be generating particles unnecessarily if we added glass_break to all bones.
     61A. We need to read and save into memory the Start and End frames from the Attack, otherwise we have no idea when the glass-breaking takes place.  We could just say frames 1-100, but then the character will break glass as far away as the distance of his attack's Extents before his fist/whatever gets anywhere near the glass.
     62B. We need to read, parse and save the list of Bones from the Attack array. Otherwise we'd have to guess which bones to add the particle to, and if we guessed wrong, a character standing near glass would break it with the wrong parts of his body. Also, we'd be generating particles unnecessarily if we added glass_break to all bones.
     63
     64   (Yes, we don't need to do A and B programmatically; the use of separate files for each patch allows us to specify which bones and frame ranges to use for each TRAM, but who wants to set up over 400 patches by hand?)
    6365C. Finally, many existing characters had the glass-breaking added to them already.  Therefore we don't want to add anything to the ONCCs/TRAMs that are already modded or we double the number of glass_break particles in the system.
    6466
    65 In traditional computer terms, just performing step 4 would require us to be able to say:
     67In traditional computer terms, just performing step 4, with A, B and C, would require us to be able to say:
    6668{{{
    6769for Attack in Attacks
     
    9092I haven't carefully reviewed that pseudo-code, as it's just an example, so there might be a logical error in there, but you get the idea.  This is totally beyond the current scope of Vago's syntax.
    9193
    92 Now, we could help s10k in adding this kind of capability to XmlTools manually, but perhaps that's reinventing the wheel when there's already a ton of scripting languages out there.  It may be a better idea to allow an existing scripting program to be called from within XmlTools and to pass it the program to run.  Or, it may make more sense to integrate an open-source interpreter into XmlTools' code.
     94Now, we could help s10k in adding this kind of capability to XmlTools manually, but perhaps that's reinventing the wheel when there's already a ton of scripting languages out there.  It may be a better idea to allow an existing scripting program to be called from within XmlTools and to pass it the instructions to run.  Or, it may make more sense to integrate an open-source interpreter into XmlTools' code.
    9395
    9496Thoughts?  Questions?  Headaches?  Angry recriminations?  I'm almost sorry to bring this subject up, but I simply don't know how else we can make a glass-breaking patch mod.  The only alternative is to write yet another private tool like the one Gumby wrote and didn't release, so why not make something that the community can benefit from?