Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Scripting Help Details

Page: 1 of 2
 razorace
07-15-2004, 11:12 PM
#1
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.
 shukrallah
07-16-2004, 11:01 AM
#2
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?
 Jawa-Trader
07-16-2004, 11:15 AM
#3
I will start with t2_rancor.
 shukrallah
07-16-2004, 11:49 AM
#4
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.
 razorace
07-16-2004, 5:10 PM
#5
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. :)
 Samuel Dravis
07-16-2004, 5:22 PM
#6
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?
 Jawa-Trader
07-16-2004, 5:58 PM
#7
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.
 razorace
07-16-2004, 6:09 PM
#8
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. :)
 shukrallah
07-16-2004, 9:26 PM
#9
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.
 Jeedai Jacen
07-16-2004, 9:40 PM
#10
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.
 razorace
07-16-2004, 10:50 PM
#11
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.
 razorace
07-16-2004, 10:55 PM
#12
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.
 razorace
07-17-2004, 2:20 AM
#13
We're burning thru them alright. :) that's four done today.
 Jawa-Trader
07-17-2004, 11:27 AM
#14
t2_rogue and t1_rail completed
 Tinny
07-17-2004, 12:10 PM
#15
hey Razor, i'm gonna try my best. finally something for us n00bs to do :). still picking a map though.
 Samuel Dravis
07-17-2004, 2:22 PM
#16
Not going to need my program at this rate... oh well, it might come in handy for new scripts that need to be converted... ;)
 Tinny
07-17-2004, 2:30 PM
#17
alright guys, i'm gonna do t2_trip.
 Jeedai Jacen
07-17-2004, 4:00 PM
#18
Sent the files to you, razorace.

I'll start on t3_bounty.

EDIT: t3_bounty done and sent.
 Tinny
07-17-2004, 7:29 PM
#19
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?
 shukrallah
07-17-2004, 8:35 PM
#20
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.
 razorace
07-17-2004, 11:09 PM
#21
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.
 razorace
07-17-2004, 11:56 PM
#22
Great job guys. Three maps worth of scripting was submitted today.
 Soul_Blade
07-18-2004, 12:32 AM
#23
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.
 shukrallah
07-18-2004, 10:58 AM
#24
//(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. :)
 Samuel Dravis
07-18-2004, 12:05 PM
#25
/*@SET_TYPES*/

Is that necessary to put in? It looks like it's commented out...
 shukrallah
07-18-2004, 12:24 PM
#26
I assume it is.. because BehavEd puts it there. I just looked at my other scripts and its there under every set command.
 Tinny
07-18-2004, 12:37 PM
#27
plans for today, hoth2 and t2_wedge.
 razorace
07-18-2004, 2:32 PM
#28
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.
 razorace
07-18-2004, 2:50 PM
#29
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.
 Samuel Dravis
07-18-2004, 3:01 PM
#30
Program's coming along nicely...should be done quite soon.
 shukrallah
07-18-2004, 3:57 PM
#31
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.
 razorace
07-18-2004, 4:14 PM
#32
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.
 shukrallah
07-18-2004, 5:30 PM
#33
ok, done with t3_stamp. I shall do taspir 1 now.
 razorace
07-18-2004, 11:41 PM
#34
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.
 Kurgan
07-19-2004, 9:47 AM
#35
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?
 razorace
07-19-2004, 12:12 PM
#36
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.
 razorace
07-22-2004, 5:55 AM
#37
Great job so far guys. :) Keep em comin'!
 razorace
07-26-2004, 11:34 PM
#38
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?
 Samuel Dravis
07-27-2004, 1:55 AM
#39
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. :)
 razorace
07-27-2004, 3:00 AM
#40
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.
 RoxStar
07-27-2004, 4:48 PM
#41
Are you finished with them all Razorace? Is the scripting work just word replacement basically?
 razorace
07-27-2004, 5:09 PM
#42
It's basically just word replacement. See the first post.

And not all of the map scripting has been done yet.
 RoxStar
07-27-2004, 10:43 PM
#43
Well. I did Academy 2.I emailed the edited icarus files and teh compiled scripts to you ojp e-mail.
 razorace
07-27-2004, 11:07 PM
#44
Got them. Added it to the completed list.
 RoxStar
07-28-2004, 11:49 AM
#45
Just sent Academy 3,4,5, and 6. This is kinda fun!:)

EDIT: I just did Yavin 2
 razorace
07-28-2004, 6:55 PM
#46
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.
 RoxStar
07-28-2004, 7:09 PM
#47
Oh... I thought that the ones I did wren't on the completed list? O well. I just did Hoth 3.
 shukrallah
07-28-2004, 7:35 PM
#48
Yeah, sorry, Ive been busy working on Redemption... hmm... I think ill do t3_byss.

EDIT: Done with t3_byss.
 razorace
07-28-2004, 8:00 PM
#49
Ok guys, it looks like areis script folder is just test scripts, so just skip over that one.
 RoxStar
07-28-2004, 8:01 PM
#50
Really? I spent like 10 minutes on that one :(. I'm doing Kor1 right now.
Page: 1 of 2