User talk:Iritscen: Difference between revisions

From OniGalore
Jump to navigation Jump to search
No edit summary
(Thanks + reply)
Line 28: Line 28:


Loser, I have tried to get chr_holdkey to work for some time now. Peering at the asm, I can see that there is code there for it, but it might have been commented out in some form. It is really hard to tell. ALSO, using a hypo doesn't seem to be one of the allowable keys. They seem to be: forward, back, stepleft, stepright, crouch, jump, fire, altfire, punch, kick, action. HOWEVER, there is a different method we can use for AIs using hypos. Record Konoko using a hypo, export\import it using Onisplit, then use the from_here option in chr_playback. I would recommend using Konoko's watch animation or something of the sort to go along as a visual cue. [[User:Gumby|Gumby]]
Loser, I have tried to get chr_holdkey to work for some time now. Peering at the asm, I can see that there is code there for it, but it might have been commented out in some form. It is really hard to tell. ALSO, using a hypo doesn't seem to be one of the allowable keys. They seem to be: forward, back, stepleft, stepright, crouch, jump, fire, altfire, punch, kick, action. HOWEVER, there is a different method we can use for AIs using hypos. Record Konoko using a hypo, export\import it using Onisplit, then use the from_here option in chr_playback. I would recommend using Konoko's watch animation or something of the sort to go along as a visual cue. [[User:Gumby|Gumby]]
Thank you for report, Gumby. Yes, I know about playback solution, that way of solving this problem works quite fine. Point of this BSL idea was that it requires only scripting, no files changed.
: But if we have to end up with changing files, then we can modify CHAR as well, adding trigger of the function *heal_mechanicsXX.name_of_ai2_written_here* into CHAR when character is hurt. XX represents number of the healing group. If I recall correctly, engine takes "''name_of_ai2_written_here''" as string parameter of the function *heal_meachanics*.
: About that XX - enemies have various health levels, but we can see some of them have quite similar max health levels (+/- 25 HP). So my idea is - we have groups of CHARacters, which share same version of heal_mechanicsXX function, labeled by its number (saves space). These CHARacters have similar max health levels and have exactly the same amount of hypos they can use.
:Then one very simple function for such a group can look like this:
::'''func''' '''void''' heal_mechanics01(string ''ai_name'')
::{
:: '''chr_wait_health''' (''ai_name'', value_of_approximate_half_of_max_HP_for_this_group_members)
:: '''playback''' (''ai_name'', name_of_hypo_trigger_[[FILM]]_file, fromhere)
::}
:This function would be triggered by members of heal_mechanics01 (they have writen it in their CHAR file, under "hurt" trigger). When called, it takes name of the CHAR as a parameter and then waits until this CHAR's HP drops around 1/2 (value is set maually in the script). Then it calles hypo using FILM for this CHAR.
: Nice, isn't it? --[[User:Loser|Loser]] 18:29, 17 March 2009 (UTC)

Revision as of 18:29, 17 March 2009

Talk page archives: #1



Hi Iritscen,
it has been a long time since I have contributed something. I don't have time (and Oni) right now, but I ask you to try this idea out. It is connected to AI2 driven characters being able to actually use hypo sprays they possess to heal themselves (like the human player).
It could be easy as it involves only usage of BSL. However, I don't know if several things (mainly "chr_holdkey" command, which is core of this idea) work the way I think they work.
Requirements for the experiment:
- take one AI2 character whose name you know from some level you like. But this AI should be near some savepoint for easy debugging.
- add function to the scripts of your selected level, which will be forked from your selected savepoint, where your AI2 spawns.
- this function will contain following commands:
"ai2_showhealth=1" - I think this is clear
"ai2_spawn name" - clear
"ai2_ignore_player=1" - to be able to experiment
"chr_inv_reset name" - to make sure we have everything under control
"chr_givepowerup name hypo" - now we know our AI2 char has one hypo
"chr_set_health name 1" - to make it logical to use a hypo ^_^
"chr_wait_animtype 0 crouch" - to be able to trigger it when you want
"chr_holdkey name keys_hypo 10" - THIS IS IT. Key part, if I understand that command right
- now run the selected savepoint of selected level, don't crouch, get to your AI2, which is active but ignores you as a player and has only one HP left. NOW crouch. If everything goes according to the theory, this AI2 will use its one hypo to heal itself. Obviously should be seen with "ai2_showhealth=1".
- if it works, please let us (community) know. This way, we can set up smarter behavior for AI2s, where AI2s heal themselves in battle. Well, they try at least, because if they get hit, healing effect is reduced, as we know. And we cannot command AI2 to "play defensively because it used a hypo and healing is in the process". At least not the BSL way.
- also, this could be used for some daodanized AI2 characters, where AI2s inject hypos to get into regular overpower mode.
- I am aware of the fact that we can use "chr_set_health" command to do the same work. However, "chr_set_health" is dependent on the value it has written in, so you have to set up some mechanisms to reduce the value in "chr_set_health" command as AI2s health drops if we want to use it as an hypo emulation. Plus it is tied with only one AI2 character then.
- hypo usage emulation via "chr_holdkey" (if it will work) is on the other hand simply used to force any AI2 char (just input its name and be sure this char has a hypo in its inventory) to take a hypo and rest is handled by engine. Simple and effective.
--Loser 00:12, 17 March 2009 (UTC)

Loser, I have tried to get chr_holdkey to work for some time now. Peering at the asm, I can see that there is code there for it, but it might have been commented out in some form. It is really hard to tell. ALSO, using a hypo doesn't seem to be one of the allowable keys. They seem to be: forward, back, stepleft, stepright, crouch, jump, fire, altfire, punch, kick, action. HOWEVER, there is a different method we can use for AIs using hypos. Record Konoko using a hypo, export\import it using Onisplit, then use the from_here option in chr_playback. I would recommend using Konoko's watch animation or something of the sort to go along as a visual cue. Gumby


Thank you for report, Gumby. Yes, I know about playback solution, that way of solving this problem works quite fine. Point of this BSL idea was that it requires only scripting, no files changed.

But if we have to end up with changing files, then we can modify CHAR as well, adding trigger of the function *heal_mechanicsXX.name_of_ai2_written_here* into CHAR when character is hurt. XX represents number of the healing group. If I recall correctly, engine takes "name_of_ai2_written_here" as string parameter of the function *heal_meachanics*.
About that XX - enemies have various health levels, but we can see some of them have quite similar max health levels (+/- 25 HP). So my idea is - we have groups of CHARacters, which share same version of heal_mechanicsXX function, labeled by its number (saves space). These CHARacters have similar max health levels and have exactly the same amount of hypos they can use.
Then one very simple function for such a group can look like this:
func void heal_mechanics01(string ai_name)
{
 chr_wait_health (ai_name, value_of_approximate_half_of_max_HP_for_this_group_members)
 playback (ai_name, name_of_hypo_trigger_FILM_file, fromhere)
}
This function would be triggered by members of heal_mechanics01 (they have writen it in their CHAR file, under "hurt" trigger). When called, it takes name of the CHAR as a parameter and then waits until this CHAR's HP drops around 1/2 (value is set maually in the script). Then it calles hypo using FILM for this CHAR.
Nice, isn't it? --Loser 18:29, 17 March 2009 (UTC)