Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[2.2]Programmable AI via scripting
#87
(02-04-2013, 08:44 PM)YinYin Wrote:  - Is there a more efficient way in determining what is in a specific area, other then iterating through the entire list of loaded objects and checking every single one?
http://www.lf-empire.de/forum/showthread.php?tid=7976
if you are looking for a specific kind of object you can try to only investigate the range where it is most likely to appear
also object slots always get filled up from low to high numbers - so if you are iterating over a larger empty area (empty object slots) you can cancel the iteration hoping that there won't be an old object lost on a higher slot because the ones below became free (blast/items disappearing)
also I suggest only iterating once, getting important/dangerous object slots (target/item/dangerous attack/ally) and then work with these numbers within all of your script
Jep, but I cannot afford to lose information when dealing with complex AIs. Imagine just THAT important T3 object was created right after the 120-object smoke cloud and then is never found by the AI, causing it to (f.e.) spam release moves without success (because it can't find the limiter condition).
I do only iterate once per character, though.

Quote:-Did anyone extract/recreate/copy the basic 'id();' LF2 uses for all vanilla chars? If not, did somebody write an own complete id() which could be refitted by me for my own characters? Or at the very least does somebody have a datasheet/list of all features performed by an basic id()-AI (aka fighting, approaching, running, picking objects etc)?
I am/was trying to create a new basic AI: http://www.lf-empire.de/forum/showthread.php?tid=8187
you can help me if you like
I will drop in my notes if I manage to figure out something you haven't already ^^

Quote:(AI - unrelated
-Is there a state that permits a character to change his facing based upon pressing left / right WITHOUT influencing the characters frame-behavior (which pretty much cancels out states 0 and 1, I guess)?)

no
there are only two frames that allow this: 110, 212
also the dash frames: 213, 214, 216, 217 (they redirect to 213, 214 though)
then there is the dircontrol in cpoints
and lastly this:
http://www.lf-empire.de/forum/showthread.php?tid=4470
Oh right, that method. Totally forgot about it. Thanks ^^

Quote:
(02-04-2013, 07:30 PM)Alblaka Wrote:  @static variables:
If creating Arrays is possibe, there is a simpler solution: Creating a basic map.
Implement two static Arrays, the first contains a number of 'num's, the second one the associated value, write a function
int getValueFor (int num)
and done.
that still uses the same amount of memory, won't it?
Not necessary. You can f.e. create a length 16 Array, assuming there will never be 16 duplicates of the ID in question.

Quote:edit: you've posted inside the threads I am linking to yourself ... why exactly are you asking these questions?
Because I seem to have forgotten all of that already ^^'
My Creations: (Click to View)

Return (String) System.getNewsOfTheDay();
Barely active, expect slow responses. If at all.


Greetz,
Alblaka
Reply
Thanks given by:


Messages In This Thread
[2.2]Programmable AI via scripting - by Boop - 06-08-2012, 06:31 PM
RE: [2.0]Programmable AI via scripting - by Boop - 06-30-2012, 01:54 PM
RE: [2.1]Programmable AI via scripting - by mfc - 07-05-2012, 10:33 AM
RE: [2.1]Programmable AI via scripting - by Boop - 07-05-2012, 11:53 AM
RE: [2.1]Programmable AI via scripting - by A-Man - 07-05-2012, 12:18 PM
RE: [2.2]Programmable AI via scripting - by A-Man - 07-19-2012, 03:08 PM
RE: [2.2]Programmable AI via scripting - by Boop - 07-19-2012, 03:15 PM
RE: [2.2]Programmable AI via scripting - by Kevin - 07-22-2012, 08:20 AM
RE: [2.2]Programmable AI via scripting - by Boop - 07-27-2012, 04:41 PM
RE: [2.2]Programmable AI via scripting - by A-Man - 09-15-2012, 05:23 PM
RE: [2.2]Programmable AI via scripting - by Alblaka - 02-04-2013, 10:05 PM
RE: [2.2]Programmable AI via scripting - by Boop - 05-05-2013, 04:44 PM
RE: [2.2]Programmable AI via scripting - by zort - 06-12-2013, 05:45 PM
RE: [2.2]Programmable AI via scripting - by zort - 06-15-2013, 01:44 AM
RE: [2.2]Programmable AI via scripting - by zort - 06-14-2013, 07:21 PM
RE: [2.2]Programmable AI via scripting - by A-Man - 03-29-2016, 01:59 PM
RE: [2.2]Programmable AI via scripting - by Boop - 03-30-2016, 10:26 PM
RE: [2.2]Programmable AI via scripting - by Gad - 02-10-2017, 06:58 PM



Users browsing this thread: 22 Guest(s)