You are not logged in.
Pages: 1
I am still pretty new to modding Oni and this might be an easy question to answer. Is it possible to create a level from scratch given the resources? Could I take this model as my level, these are the textures I want to map here here and here. These are the characters I want to spawn here and there. etc.
Is this possible or is not enough known about how that is done to be able to do that?
Last edited by Dirk Gently (08/05/10 10:08)
Offline
Its possible with some limitations right now.
Offline
Instead of making a new topic I might as well ask this here. I was looking through this tag: http://wiki.oni2.net/ONSK
and I notice that there are listings for planets 1-8, however there are only spaces for the U/V Scale, Elevation, and Azimuth values for planet 1. Could a map use more than 1 planet or star? From the wiki I see that it says that they are unused, but could they be used in a map?
(Want to know if I should be reading those values or just passing over them completely for parsing ONSK tags.
Offline
I'm pretty sure Oni was meant to be able to handle all planets at once, plus stars. It looks like they just broke out planet 1 in the field listings to illustrate how large each planet's space is (four bytes each for U, V, elevation and azimuth). Notice that after 0x60, for instance, it lists "planets 2-8" together for the next 28 bytes.
However, Oni doesn't render the planets with any occlusion and stars can crash the game. I would recommend still supporting the fields if it's not too much trouble, but if it seems complicated, then go ahead and skip them.
Check out the Anniversary Edition Seven at ae.oni2.net!
Offline
Not at all. I just need to take the ADDE values and read them as null. I was wondering if there was a reason for them if they are not used. May sound like a strange question but do the skyboxes have a bottom to them, or is just top/left/right/front/back?
Offline
I don't know the answer to the skybox thing, but I know EdT will. As to why Oni supports planets but really doesn't, it's just one of a number of unfinished or cancelled features
Check out the Anniversary Edition Seven at ae.oni2.net!
Offline
- (NSArray *)onskDataForItem:(NSArray *)row_contents withData:(NSMutableArray *)the_data {
NSArray *tag_data = [[[NSArray alloc] initWithArray: [[the_data objectAtIndex:[[row_contents objectAtIndex:0] intValue]] componentsSeparatedByString:@" : "] ] autorelease];
NSMutableArray *onsk_data = [[[NSMutableArray alloc] init] autorelease];
UInt32 get_int=0;
float get_float=0;
int bit_pusher=0;
int i = 0;
while (i < 58) {
if (i <= 22) {
[[self data_file] getBytes:&get_int range:NSMakeRange([[tag_data objectAtIndex:1] intValue]+bit_pusher,4)];
get_int = (get_int >>24) | ((get_int << 8) & 0x00FF0000) | ((get_int >> 8) & 0x0000FF00) | (get_int << 24);
[onsk_data addObject:[NSNumber numberWithInt:get_int]];
} else {
[[self data_file] getBytes:&get_float range:NSMakeRange([[tag_data objectAtIndex:1] intValue]+bit_pusher,4)];
get_float = (get_int >>24) | ((get_float << 8) & 0x00FF0000) | ((get_float >> 8) & 0x0000FF00) | (get_float << 24);
[onsk_data addObject:[NSNumber numberWithInt:get_float]];
}
bit_pusher=bit_pusher+4;
i++;
}
return onsk_data;
}
if anyone cares about code this will return an array of all the values in an ONSK tag, the values are in the same order as they appear in the tag, so just extract them by number. This will read all the values for all the planets and stars.
I should also mention that when I read I pass a variable that takes into consideration the first 8 bytes and skips them. This leaves me directly with the relevant data for the tag and minimizes the load.
Last edited by Dirk Gently (08/05/10 12:08)
Offline
From the wiki info skyboxes do not have a bottom.
Offline
I guess my question should have been phrased as such: Does it have a definable bottom. Such as if you raised it high enough above the level without changing the height of the sides then would you see that it is bottomless?
Offline
I don't know :-)
Offline
What would be nice is a list of tags that actually do appear in maps. some of these are listed but I cannot find them at all....
Offline
Could it just be that a given map doesn't use certain tags? Which ones aren't you finding?
(Moving this to Modifications....)
Check out the Anniversary Edition Seven at ae.oni2.net!
Offline
Will this help: http://wiki.oni2.net/AKEV
Offline
This time about the saved game files. Oni does 4 saves per level. The file allows for 10. Will the game only read the first 4 or can we add more? I want to know if I should be adding the ability to create savepoints. Currently you should be able to modify the spawn coordinates of your saves as well.
Can we edit the spawn properties at the start of levels? or will they always be stock?
Offline
The only instance where savepoints were added is Leus at the end of his modified final battle, and that was last savepoint. As for inserting savepoints in the game, as far as I'm told by others on the forum, it's very difficult if not impossible. I've tried myself, and didn't get too far.
You can try and experiment, look at the "savepoint" lines in BSL files in IGDM, and maybe try to understand how they're done, experiment, and see if you can come up with anything. Up to you if you want to put the effort in or not
"He looks mean enough to tear my arm off and beat me to death with it. In fact, he looks mean enough to tear his OWN arm off and beat me to death with it."
Offline
This time about the saved game files. Oni does 4 saves per level.
Actually, Oni uses a variable number of saves per level, anywhere from 2 to 5 if memory serves.
Can we edit the spawn properties at the start of levels? or will they always be stock?
The issue is one of BSL, not the savegame file. The state of the game when you load a savepoint is "hardcoded" into the level scripting. There's no actual game state-saving in Oni, just a flag that says "Okay, the player made it this far".
Check out the Anniversary Edition Seven at ae.oni2.net!
Offline
Oh yes. I see now I was just looking at the first few levels that only have 4. Ok. You should still be able to edit spawn coordinates for the save points. which is at the very least something that the original saved game editor could not do.
currently it does not support PPC saves, but it may include a converter between the two formats.
Offline
Ah right, so there is that tiny bit of state-saving after all.
Check out the Anniversary Edition Seven at ae.oni2.net!
Offline
Can someone explain how the weapon slots work? I am finding that you can have weapons any of the three slots without any sort of indication as to which it is supposed to be stored in. Checkpoint 1 might have it in slot 1, 2 might have it in slot 3, 3 might have it in slot 1 again and 4 might have it in the second slot. How are they handled?
Last edited by Dirk Gently (08/25/10 08:08)
Offline
Slot 1 is the active slot. If it is empty you have melee out. Slots 2 and 3 are inventory, but only one is used at a time, the other being used usually when forced to holster a weapon.
Iritscen:
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours
Offline
do we know how it picks between slot 2 and 3?
Offline
Haven't checked it throughly, no. It shouldn't matter which one you choose though.
Iritscen:
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours
Offline
How are res_ID numbers read and translated into the correct number for the tag in the level file?
EDIT: flip byte, divide by 256. nevermind.
Last edited by Dirk Gently (08/31/10 09:08)
Offline
Pages: 1