Basically, what we're doing here is changing the format for the camera calls so that the MP ICARUS scripting can read it. Unfortunately, the ability to fix the issue without doing this would require the full engine code, which we are not going to get.
Materials Required:
- JKA SDK (specifically the source ICARUS files and the BehaveED)
- a simple text editor
What To Do:
What we're doing is converting the camera function calls from camera () to set (). This is very easy. All you gotta do is copy the first part of a set () onto the first part of a camera ().
For example, this...
camera ( /*@CAMERA_COMMANDS*/ MOVE, $tag( "endcam1", ORIGIN)$, 0 );
Becomes this...
set ( /*@SET_TYPES*/ "MOVE, $tag( "endcam1", ORIGIN)$, 0 );
NOTE: For you non-programmers out there, the stuff inside /**/ (like /*@CAMERA_COMMANDS*/ or /*@SET_TYPES*/) are just code comments. They don't matter to the scripting.
The second step is to add quotes to the camera action type (PAN/MOVE/FADE/etc).
set ( /*@SET_TYPES*/ "MOVE", $tag( "endcam1", ORIGIN)$, 0 );
The third step is to add quotes around all of the camera settings data. What this is doing is converting all of it into a single data string to be processed by the game.
set ( /*@SET_TYPES*/ "MOVE", "$tag( "endcam1", ORIGIN)$, 0" );
The final step is to remove any internal quotes that are inside your single data string for the camera sets only. If you don't, you'll have the ICARUS compiler erroring about too many parameters. In this case, we're removing the quotes about the entity name in the tag.
set ( /*@SET_TYPES*/ "MOVE", "$tag( endcam1, ORIGIN)$, 0" );
NOTE: Do not alter the tags on sets that aren't camera functions that you converted. You'll totally break the tag system for everything other than cameras.
NOTE: ENABLE and DISABLE camera commands do require a value. I normally just use "1" but it doesn't matter what you use.
set ( /*@SET_TYPES*/ "ENABLE", "1" );
That's all you gotta do in terms of editing. From there, you need to save the file into .txt format and then use BehavED to compile the script. If you get compile errors, you screwed something up. Feel free to post questions if you have troubles but please be sure to include the exact compiler error.
What I Need:
- The compiled script
- Your modifed ICARUS source in .txt format
- What folder/map the script is for
- Only send me the files that needed to be modified. We're trying to save as much space as possible so the non-modifed compiles would be a waste of space.
Scripts Completed: (all scripts for given map)
- JKA Completed
JK2:
- artus_detention
Final Words:
Remember that the faster we can figure out and debug these scripts, the faster Co-Op mode will be completed. If you help me out with the scripts, you will be given credit in the readme AND exclusive access to compiled betas of the Co-Op code.
CRAP! RAZORACE! Your joking right?!?! This is awesome. I suppose BehavEd doesnt do this, you would have to use notepad right?
hey man, if you need some scripting references, I made some stuff, and i think it works in MP... I had the falcon flying, but that doesnt run in MP.. there was another way to do it. I had it working back in Febuary for multiplayer, but its on another PC.
http://home.ripway.com/2003-11/40395/Gun_script.zip)
EDIT: This script was supposed to put a snow trooper on the emplaced gun... it didnt work, at least, not in Multiplayer, it works perfectly in SP. Think you could get it to work? I guess even if it didnt work, it wasnt used enough to really matter in SP anyways. I think it was only used on the Hoth missions. Also, if this doesnt work, the swoop level wont work right either.
http://home.ripway.com/2003-11/40395/rolling_rock.zip)
http://home.ripway.com/2003-11/40395/Walking_animations.zip)
I heard your making a co-op type mod on the mapping forum, so those might help you out a bit. Question: is your Co-Op just the normal Raven SP maps, or are you going to make SP maps.
All that stuff above will work without any extra coding? Also, what effects does it have on the game, what about lag, and what if I joined in the middle of a cutscene? What about skipping cutscenes? These could cause some undesired effects. Im sure youve tested this out fully on a server, im just curious as to how this all works out.
So, I guess your using the scripts Raven supplied, and changing the camera, and resubmitting the edited scripts in OJP?
I will start with t2_rancor.
Ok, I got a ship to fly in MP, but... after re-reading your post, I see that you are redoing the SP campaign, which is cool, but why not create another small SP campaign after all of those scripts are converted? if you want...
EDIT: razorace, also, misc_model_breakable are NOT in MP, unless you put them back, well.. this co-op will not work.
Well, I'd love to do an additional campaign but we'd have to have some talented mappers, which we don't have. If you want to handle leading such a group, that would be great, but I'd prefer to not get sucked into a political trap of trying to modivate a bunch of people that don't do anything. However, I would do any code that they would need to get their maps to work.
I've already implimented a large number of the SP map entities including misc_model_breakable, the ammo rack code, and most of the camera code.
As for how things will behave if someone joins in the middle of a cutscene, I'm still working on it but it will work. :)
I'm working on a program to convert all 1500 of them at once, obviously this would be much easier than trying to go through them line by line. I'll probably have it done sometime this week - what time frame were you trying to get all this done by?
Assuming Dravis will have this prog working for us, I will hold off on working through any more. In the meantime, I could be working in another area.
Well, I'm still messing with other code so you do have some time. However, the more scripts I got, the better idea I have of what needs to be fixed.
Jawa-Trader, I suggest you continue working on the scripting anyway. There's no point in having idle hands....unless you can come up with something better to work on. :)
I'm personally trying to get the game completed in sequencial order. That way we could finish up tier one and release a demo of sorts. :)
Excellant, considering you have coded the proper stuff, this will work out :)
If you want to handle leading such a group, that would be great, but I'd prefer to not get sucked into a political trap of trying to modivate a bunch of people that don't do anything. However, I would do any code that they would need to get their maps to work.
I would like to start something.. but... Im probably too busy. As long as the ammo_racks, misc_model_breakable works, and the camera, nothing else should require coding. If we have a team, it would work out though, as long as they would do work and not slack off, then it would be ok for each mapper to do a little, maybe one level each (as long as the story matches up correctly) and it would work out just fine :) Of course, it would require everyone to discuss in private a story... but, well, you get the general idea.
Ill contact you some time in the near future and start something, when my project is closer to completion. I would just do both now, but.. sadly Ive fallen into the trap of accepting requests, and am currently working for TPM, TMU, JTA, and Redemption (my project) not to mention a few maps I need to make. Its not that I dont mind doing them, its that.. well.. its a lot of work to do.
razorace:
I've been watching OJP for a while, and this seems like something I can do. I've started on t1_danger.
EDIT:
Well, there were only 2 files in it that needed to be changed. Do you want all of them, or just the changed ones? Also, the compiled files should be *.ibi, correct? I've also started on t1_fatal.
EDIT PART 2:
Finished and compiled both t1_fatal and t1_danger.
great, please email me the .ini and .txt sources. And yes, I only want the ones that needed to be changed.
I'll be handling yavin1b myself.
lukeskywalker1, I agree. That's the same problem I have.
It's a waste of effort on my part to try to organize some mappers to create a new campaign if they're just going to dick around and not do anything.
We're burning thru them alright. :) that's four done today.
t2_rogue and t1_rail completed
hey Razor, i'm gonna try my best. finally something for us n00bs to do :). still picking a map though.
Not going to need my program at this rate... oh well, it might come in handy for new scripts that need to be converted... ;)
alright guys, i'm gonna do t2_trip.
Sent the files to you, razorace.
I'll start on t3_bounty.
EDIT: t3_bounty done and sent.
hey Razor, i'm done with t2_trip but how do i send it to you? i looked at your profile and it won't let me see your e-mail, you want me to just send it when i see you online?
Yeah, im working to finish some of my other projects, If I can finish the work they want me to do for TMU and JTA, finish.. 2 parts of Redemption and a map.. Ill contact you and maybe set something up :-\
EDIT: Hey, did you code the 'use' command in scripts, and the playermodel command? You will need that too... also, Boba's Jetpack will be needed.
Tinny, just talk to me the next time you're online.
lukeskywalker1, you're going to have to be more specific about the playermodel and use commands. I don't know exactly what you're talking about.
Great job guys. Three maps worth of scripting was submitted today.
Hey Lukeskywalker1!
Me and razorace were talking, and thought that a few maps based in the clone wars could be rather enjoyable for a co-op mode. Doesn't have to be a whole new storyline or anything, we can just pick/create a few battles and have some serious hack 'n' slash action. I'm the leader of the clone wars mod so we have a few models (more to come) and there's some guys that'd help with the mapping too.
If you've ever played Jedi Power Battles you'd probably have a fair idea of what i have in mind. A simple system where you and your co-op pal choose a jedi each then take on an army of droids and there'd be bosses eg Asajj, Durge... Grievous would be hard but maybe him. Just a random, replayable SP "campaign" with clone wars theme.
//(BHVD)
set ( /*@SET_TYPES*/ "SET_PLAYERMODEL", "Kyle" );
Its not really necessary, (normal SP doesnt use it) but.. if it could be required for a custom Co-Op.
//(BHVD)
use ( "what_ever" );
Use is more important, its what makes NPCs use things like emplaced guns, and I think vehicles, like the swoop. Otherwise, t2_trip will be worthless... because the cultists will just stand around with a swoop next to them... Also, Raven gave certain enities, such as the level change enitity a targetname, so they could change the level through a script, the only way to do this is by the use command. It might already work, but im not sure.
Sounds good Soul_Blade, we could even do Hoth, or Endor, as long as there is scripted stuff ;) If you could get me some ship Md3s, or even just ships made out of brushes, I could get them flying over the battle scene (it just adds to the atmosphere) stuff like that.
Yo, razorace, I think Ill try out taspir 2 today.
EDIT: I guess we have to do the skip scripts too?
EDIT2: Just a note: I made the commands track/follow/shake the same way I did move/pan/fade... seemed to compile just fine. :)
/*@SET_TYPES*/
Is that necessary to put in? It looks like it's commented out...
I assume it is.. because BehavEd puts it there. I just looked at my other scripts and its there under every set command.
plans for today, hoth2 and t2_wedge.
NOTE: Do not alter the tags on sets that aren't camera functions that you converted. You'll totally break the tag system for everything other than cameras.
If you did alter the non-camera tags, you're going to have to resubmit your work.
To answer any leftover questions that I missed while sleeping:
Is that necessary to put in? It looks like it's commented out...
I'm pretty sure it's commented out.
Its not really necessary, (normal SP doesnt use it) but.. if it could be required for a custom Co-Op.
It's not currently implimented and I don't see it really working for Co-Op anyway. Everyone would look the same.
Use is more important, its what makes NPCs use things like emplaced guns, and I think vehicles, like the swoop. Otherwise, t2_trip will be worthless... because the cultists will just stand around with a swoop next to them... Also, Raven gave certain enities, such as the level change enitity a targetname, so they could change the level through a script, the only way to do this is by the use command. It might already work, but im not sure.
Oh yeah, use is already implimented but I don't know if it will work for the NPCs boarding the speeders or not. I assume it will.
EDIT: I guess we have to do the skip scripts too?
Yes, we need to do every script that has a camera command and is actually used by the game.
EDIT2: Just a note: I made the commands track/follow/shake the same way I did move/pan/fade... seemed to compile just fine.
All the camera commands. :)
Secondly, remember that this is a hack to get the stuff to work. Just because it compiles in the BehavED doesn't mean that you did it correctly.
Program's coming along nicely...should be done quite soon.
Secondly, remember that this is a hack to get the stuff to work. Just because it compiles in the BehavED doesn't mean that you did it correctly.
Yeah, remember I script, razorace, BehavEd almost never stops compiling unless you set up the move command incorrectly (or mess up what we are doing here) looping scripts can also mess up the compile if done incorrectly.
EDIT: I have Taspir2 done, I think.. I should have gotten all the scripts (19 by my count)
Ill take t3_stamp next.
Oh yeah, just a reminder but please only send me the files that needed to be modified. We're trying to save as much space as possible so the non-modifed compiles would be a waste of space. If you sent me more than what was changed, please contact me.
ok, done with t3_stamp. I shall do taspir 1 now.
t2_wedge, taspir1, taspir2, hoth2, and t3_stamp have been submitted. Thanks guys!
You know. Once we got JKA done, we might want to do JK2 as well. Afterall, the scripting and AI is basically the same.
Secondly, about an additional campaign. Maybe we could do it from the bad guy's perspective. That way we could avoid nasty amounts of modeling and coding work by not doing the more complicated bad guys. AND be able to use our hero models as the level bosses.
I'd love to see both sides of Coop, Good guys and Bad guys.
Whatever, it's cool.
Though with JK2, isn't there a major limit on entities that prevents Coop from working on that game?
Well, that's what WLS claimed. I don't know how true that was. However, I do know that the entity limits for MP and SP JKA are exactly the same. In addition, most of the map entity limit tends to be taken up by entities that are deleted immediately on map start.
So, all the maps should work assuming I get the code right.
Great job so far guys. :) Keep em comin'!
Added academy1 and academy2.
Is there any particular reason why people quit submitting scripts? Is my email broken or did everyone get tired of doing it?
Sorry about not having the program ready, just thought it was better to have more people contributing than just me. I'll get it to you soon. That should help out a bit. :)
Right well, everyone else (other than Tinny) seem to have given up doing it.
But either way, we could still really use that program. :) If it works smoothly enough, we might be able to do the JK2 maps as well.
Are you finished with them all Razorace? Is the scripting work just word replacement basically?
It's basically just word replacement. See the first post.
And not all of the map scripting has been done yet.
Well. I did Academy 2.I emailed the edited icarus files and teh compiled scripts to you ojp e-mail.
Got them. Added it to the completed list.
Just sent Academy 3,4,5, and 6. This is kinda fun!:)
EDIT: I just did Yavin 2
Thanks for your help Roxstar. We're burning thru them. :)
However, please be sure to check the completed list (in the thread's first post) so we don't end up doing the same maps over and over. I think you're already sent in two that I had already done. That's ok dokie thou. Keep them coming.
Oh... I thought that the ones I did wren't on the completed list? O well. I just did Hoth 3.
Yeah, sorry, Ive been busy working on Redemption... hmm... I think ill do t3_byss.
EDIT: Done with t3_byss.
Ok guys, it looks like areis script folder is just test scripts, so just skip over that one.
Really? I spent like 10 minutes on that one :(. I'm doing Kor1 right now.