User talk:Neo: Difference between revisions
No edit summary |
m (Another scripting language: AutoIt3) |
||
Line 129: | Line 129: | ||
[[User:Neo|Neo]] | [[User:Neo|Neo]] | ||
the only scripting language to do a Windows GUI that comes to mind is Tcl/Tk but you really don't want to use that :) | |||
You can also try AutoIt3: http://www.autoitscript.com/autoit3/ | |||
It's easy to create a GUI with both of them, but AutoIt3 can't work with binary files, only text files (as far as I known). And in case of tcl/tk: It's a pain to install it. I tried and failed. | |||
[[User:Ssg|Ssg]] 11:44, 23 June 2008 (CEST) |
Revision as of 09:44, 23 June 2008
Sorry to bother you. I want to add some more characters to level 19, but I'm not sure how to write the hex number correctly, since it is 5 digits.
In the BINACJBOCharacter.oni for level 19 at offset 0x68 currently its 8CDC, I want to add 17 more CHAR data (x2464) so doing the math xDC8C + x2464 = x100F0.
What is the correct way to write x100F0 in little endian at offset 0x68?
Of course, I'll have to make a similar change for 84DC offset xC4.
It will be great once/if we're able to export/import BINACJBOCharacter.oni as .xml files!
Many thanks.
EdT 06:54, 20 June 2008 (CEST)
I'm not sure what's supposed to be at 0x68, maybe you mean 0x88 (where the size of the raw/sep part is)?
Anyway 0xA1B1C1D1 is stored as:
- A1 B1 C1 D1 - big endian (bytes are stored in the same order)
- D1 C1 B1 A1 - little endian (bytes are stored in reverse order)
So 0x100F0 aka 0x000100F0 stored as little endian is F0 00 01 00.
PS: I'm almost done with OBJC export. Hopefully I'll do the import soon too.
I am sorry to bother, but this can help to make h2w system look better. When character collides with wall, what REALLY collide ??? For me it seems that for char->wall collision there is some invisible bounding box. Where is this bounding box, if you know (or correct me if I am wrong). How can I change it? I ask because for me (it is my guess in next sentence, nothing proven ) it seems that this "bounding box" looks like invisible sphere which is around pelvis bone. That is why you can fall and stick your torso/head/legs into next room. Engine ignores bones in char->wall coll. Is this correct? + please answer if you know how to change it. Thanks a lot in any case
P.S.:Just a curious question, no explanation needed: I know that AI2 powered characters can push away weapons which are on ground. Can it be (from engine-possibilities point of view) that in ONI we should have movable furniture (objects which can be pushed by chars)?
--Loser 11:34, 20 June 2008 (CEST)
Umm... many questions, time for a brain dump :)
- Character - Wall collision
- this is always sphere tree-quad collision. You probably know that the sphere tree can be seen with "chr_debug_sphere=1". One thing to note about that sphere tree is that it always "stays up" (even when the character is fallen). That's why fallen characters pass through walls, their body gets outside the sphere when that happens.
- As for changing the radius of that sphere tree: it may be possible but it won't solve anything.
- Character - Floor collision
- characters also have a special function to detect floor collision which checks if a 3x3 quad intersects the floor. This is done to avoid "strange" sinking when the sphere's lowest point goes outside the floor. This is the probable cause why sometimes fallen characters hang on an edge (their 3x3 quad still intersects the floor) or fall of the edge even if their feet or head are still on the floor (the 3x3 quad is too small to cover the feet and head when the character is fallen).
- Particle - Wall collision
- this is always point-quad collision (the point is the position of the particle)
- Particle - Object collision (where object is anything with a physics context that supports collision
- characters, OBOA objects, powerups, weapons)
- this can be sphere-obbox or sphere-sphere collision depending on what the object has (obbox or sphere tree). The radius of the particle sphere is taken from Collision Radius property of the particle class. It can be 0 and then the collision degenerates to point-obbox/point-sphere collision.
- Environment collision (general)
- The engine can only do point-quad and spheretree-quad collision detection.
- Object collision (general)
- All objects (that have a physics context) have a sphere tree attached to them and some objects created through OBOA also have an obbox.
- Moveable furniture
- Yes and no. It can be done to some extent using OBOA.
- Basically an OBOA object can be pushed if it's not animated (no OBAN link) and it has "physics type" 2 or 4 (I don't know what's the difference).
- What doesn't work:
- characters fall through objects (the character-floor collision function does not see objects)
- since the environment only supports sphere-quad collision you tipically cannot push an object very close to the wall (unless of course the object itself is a sphere or close enough to one)
- objects can fall but because of sphere-quad collision detection they'll get stuck somewhere above the floor
- an object can fall on another object but a third object will fall through both of them; in general multiple object interaction is buggy
- if I remember correctly there is 128 physics context limit. That means the number of active characters + objects + powerups and whatever else needs a physics context is limited to 128. Anyway it will very likely crawl before you reach that limit.
Thank you, now I understand, I need to add leading zeros to the result. Also, a user at OCF asked if it was possible to do division and multiplication in BSL, is it possible?
I look forward to trying out the OBJC export.
Oh boy, were Mono developers lazy or not... :)
Thank you! BINACJBOCharacter.oni works fine, now to take a look at the melee profile file...
Ed
The melee profile is much more understandable. The moves are clearly identified. So I assume, now we will be able to create a new melee profile or at the very least add new techniques to an existing profile.
Again, THANK YOU on your awesome work on OniSplit.
EdT 06:17, 22 June 2008 (CEST)
2 notes about melee:
- I've yet to make move types to show up as names instead of numbers. Remebering all those is not fun.
- The original melee files contain what appears to be orphaned moves. Since currently moves are exported as children of techniques the orphaned moves are not exported. I don't think those moves are used by the engine but if someone knows otherwise I'll see what can be done to export them too.
Other stuff:
- The general xml export was updated to export names instead of number for several enum and flags fields. For example the class of a dialog item in WMDD was previously exported as a number but now it's a string like Button, Edit etc. Flags fields are exported as a list of names (names separated by whitespace) like in this WMDD state field:
<State>Visible Disabled</State>
This simplifies editing but currently there is now way to discover what names are available (unless you take a look at the source code :)). I'll try to make OniSplit display such a list as part of the help or something.
Hey Neo, do you have any idea what the flag "Boss" does?
Gumby 18:02, 22 June 2008 (CEST)
Not sure. It mai be connected to ai2_boss_battle script variable. And I'm not sure those flags are 100% correct, it looks to me that Boss/NoAutoDrop/Omniscient are mixed up.
Hello again. I am thinking of writing the Windows GUI for Onisplit. What scripting language would you suggest I write it in?
Gumby 02:55, 23 June 2008 (CEST)
Hmm... the only scripting language to do a Windows GUI that comes to mind is Tcl/Tk but you really don't want to use that :). There are Perl/Python/Ruby etc. implementations for Windows but I have no idea if they can be used to make a GUI. It's likely that you'll have to use one of the "usual" languages: C/C++/C#/VB/Java/Delphi...
Maybe I'll do a GUI one day but it's not on my priority list, I'm more interested in making importers/exporters for now.
the only scripting language to do a Windows GUI that comes to mind is Tcl/Tk but you really don't want to use that :)
You can also try AutoIt3: http://www.autoitscript.com/autoit3/
It's easy to create a GUI with both of them, but AutoIt3 can't work with binary files, only text files (as far as I known). And in case of tcl/tk: It's a pain to install it. I tried and failed.
Ssg 11:44, 23 June 2008 (CEST)