Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[2.2]Programmable AI via scripting
#21
(06-12-2012, 07:31 AM)Alblaka Wrote:  -enchant_stuff

loading objects is already planned for other stuff such as johns team healing (or fully overriding basic AI and choosing the target yourself) - so instead of such a very specific 'enchanting' i would suggest something more general that you could use for this as well:
loadobject(condition)
this function would write all existing variables of the first object that meets the condition into object_variables (same as self_ and target_ stuff)
(as silva already told me - the function would iterate over all 400 object slots available - so the condition would already contain stuff like object_z==self_z to check for your kind 8 itr for example)
after loading this stuff onto the object_variables you can work with them
and yes object_type would be really good
this could also be used to determine the held weapon (where the type is much more important than the object_id too for the AI)

(06-12-2012, 07:31 AM)Alblaka Wrote:  Random guess, B4? "Shaking" pretty much describes the effect of armored people getting hit without taking damage. Unless it's an entirely different thing.
As well I remember to have read about "bdefend" being used for determining an armors remaining strength as well, not sure whether that's correct though.

I think you probably still didn't understand what exactly I want. I'm aware armor is coded via ID. But if you hit Julian twice, wait half a second and hit him two more times, the fourth hit punches through the armor, indicating there must be any sort of counter to determine when the "armor" of an object is temporally depleted.
read again what i posted - armor is only a higher bdefend capacity and being in a defensive state all the time (for louis only basic states and not against fire and ice)
also normally hit characters shake too while they are in hit lag

edit: so yes the bdefend doubles as the armor counter - and if you check the id of your target and notice its an armored one you can simply rise all conditions working with the bdefend level that usually breaks defense as it will be higher)

edit: also armored characters getting hit do take damage ._. even if its small
Reply
Thanks given by: Alblaka
#22
Updated again. Now the original AI works! Go fight your AI against the original AI :D.
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by: YinYin
#23
Please give the source dll pleasssee
Without source code, this thing is useless to me :(
Reply
Thanks given by:
#24
(06-15-2012, 07:33 AM)Bender_EX Wrote:  Without source code, this thing is useless to me :(

why? this works on any lf2 2.0a
even modified ones
Reply
Thanks given by:
#25
You misunderstood me, I need the source code so I can not add their charms in dll
Reply
Thanks given by:
#26
(06-15-2012, 08:20 AM)Bender_EX Wrote:  You misunderstood me, I need the source code so I can not add their charms in dll

I still don't understand. What do you mean "their charms"? I'm not releasing the source code any time soon.
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by:
#27
@Bender_EX

You should create a folder called "AI" and .chai files inside it. Example: 2.chai is for John. You follow this tutorial to see what you have to write inside it.(just use notepad to open the chai file). http://www.lf-empire.de/forum/thread-7946.html

Or you can directly download AI folder with it's chai file in the first version of this, look at first post of this thread>Original post.
Reply
Thanks given by:
#28
This is cool. Kinda makes me want to create (or at least start) a mod using it.

Questions:
Is there a way to remove/hide the terminal. (haven't experimented with this too much, so it might already be implemented, and I just haven't found it)

Also, does defining functions within the script cause performance issues, as they are defined every times the script is run?
For example: (obviously the "func" function is quite useless)
    C-Code:
def func(){
    print("test");
}
 
func();
func();
func();
 
return 0;
Would it be better to simply write print("test") thrice?

And lastly, can you make global variables that are shared among scripts, and variables that keep their value from the previous execution?

(If some of these aren't implemented, I would love to see them implemented)
Age ratings for movies and games (and similar) have never been a good idea.
One can learn a lot from reinventing wheels.
An unsound argument is not the same as an invalid one.
volatile in C++ does not mean thread-safe.
Do not make APIs unnecessarily asynchronous.
Make C++ operator > again
Trump is an idiot.
Reply
Thanks given by:
#29
1) This is still "beta" if you will. Once it's properly done I'll make 2 versions, one with a console(debug) and one without.
2) I wouldn't say it causes "performance issues", but it is slower. Using functions is always slower because of all the overhead of calling the function. I'd say the speed difference is negligible.
3) I don't think that'll happen any time soon. It'd require rewriting large chunks of what I've done and cause lots of issues. Right now it's all ID based, what if there are 2 objects with the same ID? You'd get screwed over. It'd require making everything object based. Now what if the object gets recreated and is now different? I'd have to clear all the variables. Too many issues. I don't really think they are needed either, you can usually "guess" what you're doing/planning. You can guess if you started a combo by looking at your frame number and the targets and other things.(wait for yinyin to release his davis AI :p)
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by: Som1Lse
#30
Quote:Here is a suggestion:
I think u should add an armor in your todo list. Atleast if this is even possible using the above method.
Without the source code your armor does not add a dll :((((((((((
Reply
Thanks given by:




Users browsing this thread: 2 Guest(s)