Jump to content

Need help with campaign


Cookie857

Recommended Posts

I am starting a new mod with a campaign and I was wondering if anyone would be able to supply me with some basic coding knowledge and a few extra actor files. The first mission is going to take place in the original POW camp map and you need to break out. I want the map to take away your weapons and replace them with a pistol and you don't have any people on your team. I wanted to know if this was possible. Also this is my first time modding Ghost Recon apart from a few small test maps. If you could help me I would appreciate it immensely.

Edited by Cookie857
Link to comment
Share on other sites

Hi Cookie,

You will need to read up on how to use IGOR, from there you can script your own missions, add enemy forces, vehicals and new enviroment (sounds, weather etc)

IGOR is a built in scripting tool that will allow you to open up any map and clear it of a scripted mission then save it as a blank map ready to do your own thing on :thumbsup:

Im not sure which version of GR you have ? if you have the CD/DVD version there is a PDF file on one of the discs With Basic instructions on how to use IGOR. Then you you can search the forums here, or look in the Download section, under GR modding to find more Basic and advanced scripting guides. :thumbsup:

But if you have the steam version of the game im not sure were this file is locaded :unsure: i asume its there somewere, as the steam version has IGOR. But i sure someone here will know were it is :thumbsup:

Good luck

Link to comment
Share on other sites

To have one player in your team you can either do 3 things:

Kill all the other players in the team at the start of the mission.

Teleport all other players in your team to a remote location on the map and put avatar swtching to off.

Set a mission failure criteria based on the number of players in the players team.

Switching to pistols is easy. Just used the setactorkit command to either a player variable referencing the only player in the platoon or actor nearest insertion.

Link to comment
Share on other sites

Cookie, here is a step-by-step tutorial on what you'll need. Once you get familiar with IGOR, it's very easy to use. PM me if you have any questions, and you can also contact Tinker. He is much more experienced than I am.

I am assuming you already have the map, mission, and briefing specifications set. I would suggest not using a template mission. So, when you go into IGOR, click new, and when a popup box comes up saying Choose Template Mission, click the escape button at the top of the tab. It will then bring up a larger tab with a lot of specifications. To use the POW Camp map, you'll need to do these things:

1. Click on 'Select' next to 'Environment'. From there, navigate to Ghost Recon\Mods\Origmiss\Map\M11_POW_CAMP, and double click the POW Camp .env file.

2. You can choose to have Map Shots, which show in the mission select menu. These are just pictures of the landscape. Once again, click 'Select' next to 'Map Shots', navigate to Ghost Recon\Mods\Origmiss\Briefings, and select m11_pow_camp_shots.rsb from the list.

3. You do not need to fill in Map Name, Map Size, and Recommended Game Types. Also, leave Available to Custom Gametypes unchecked.

4. If you want, you can modify the fog by checking Override Environment. For a stealth mission like you want to make, I would suggest setting the fog like this:

Near: 25

Far: 50

Max Spot Range: 3

The spotting range tells the game how far the AI, not the players, can see. So always make sure that the Spot Range is lower than the Far fog setting, because you don't want the enemy to be able to see farther than you can.

5. Click 'Ok' at the bottom of the tab. It will load for a moment, and then bring up the IGOR interface. I will give you a brief summary of how everything works if you would like, but here is a detailed tutorial on IGOR at this link: IGOR Tutorial

Now, about the interface. On the left-hand side of the screen, you will see two tabs. There is a blue box at the top. This shows the collision walls (more details in tutorial) You can drag the red box around, which will move your camera. You can also move the camera (center of screen) by pressing W (forward) S (back) A (left) and D (right), Q (Down) and E (Up). You can hold shift to go faster while moving, and the arrow keys also move you very fast.

To place an object, select it from the list on the bottom left of the editor. Hold Ctrl and click where you want to place the object.

Here are the objects you can place:

Actors:

Actors are people that can be placed throughout your mission. They can be scripted to move, perform actions, and more. Also, before editing, you should get Desert Storm and Island Thunder, if you don't already have them. It gives you many more choices of maps and vehicles, actors and more.

Misc:

Miscellaneous objects are things like Companies, Platoons, Teams; Special Effects, Zones, Objective Waypoints, and Mounted Machine Guns. You can place these just like actors.

Plans:

Plans can be assigned to vehicles or actors. They tell them what to do, e.g., move, fire, surrender, etc. etc. They are not physical objects though, and cannot be seen, heard, or anything else.

Sounds:

Sounds are 3D objects that cannot be seen, but emit a certain sound. These add realism to your map, e.g. birds singing or cannons firing in the distance. If you use a template map (see above), the sounds and zones are already placed. But it keeps some things such as the mission location from the actual RSE mission, so I don't usually use template missions. I would suggest using method shown above. Sounds are placed just like all other objects.

Vehicles:

Vehicles are vehicle. :D Place them just like actors and machine guns. More on them later.

ORIENTATION OF ACTORS, VEHICLES, AND GUNS:

Orientation: To make a vehicle, machine gun, or actor face a certain direction, select the desired object, hold shift, and click in the direction you want them to face. A small line will come out of the object, showing which way they are facing. Very simple. Note that if you have an Actor performing an action, (more on this later), he will face 90 degrees to the right (or left, I don't remember :lol: ) Just picture it like this: if you want to face an actor who is performing an action, you can pretend that the line that indicates their direction is their left arm, this will help you place them correctly.

On the top right of the editor is the list of categories of objects you have placed on the map currently. From there you can select any of the objects you have placed. Not much else.

On the bottom right is the properties tab. If you have an object selected, you can change many specifications of it, such as what weapon an actor has, if a vehicle should stop if it is shot at, or if a zone should be the insertion zone or not. More on this later.

Once you have all of these matters understood (if you don't already), we can start on the scripting side of the mission. First, I am suppposing you are a prisoner in the wire-compound in the west (left) side of the POW camp. We will first create a zone inside the cage. This will be where the players will start. While our new zone is selected, go to the properties tab and rename it to something like 'Zone - Insertion'. (I always put the type of object as the object's prefix. This will help you a ton later on with orginization) Then, scroll to the bottom and check Insertion. Do not check Recon Insertion, just check Mission Insertion at the very bottom.

I have to go for a while, but will get back in touch soon. Good luck.

Link to comment
Share on other sites

Thanks for all the help so far I have managed to set it up so it replaces your kit with a pistol and the squad being teleported away but somehow they manage to find their way back to the player. At the end of the level, when you escape the camp I thought it would be a good idea to have a vehicle pull up that you need to get into to complete the mission. I haven't had any success with getting the vehicle to move successfully or for the player to enter. Also is there a way to get an actor to move without using paths? I have an idea for a mission that involves an enemy that goes to an area but not in a predictable way.

Edited by Cookie857
Link to comment
Share on other sites

Okay, to answer your questions.

First, for getting rid of the AI, teleporting is not a good idea. I am assuming that this is a singleplayer mission, right? Because this method will not work in a co-op mission. Anyway, here it is.

1. Run the editor.

2. Open your mission.

3. Click Script and then click Edit.

4. On the right side of the Script tab, click New.

5. Leave the Group on Default.

6. In the comment space, type whatever you want. This does not affect anything in the game, it is just for orginization. I always name my first block something like '01: init'. If you use 01, 02, 03, etc. for the prefix, they will show at the top of the list of script blocks since it is alphebetized. This is just something I do, you don't have to do it.

7. Under Trigger Event, click Edit. Scroll down to the bottom and select 'Startup'. Click OK.

8. Under Responses, click Add. Scroll through the list until you find VariableSetPlatoon. Select it, and while on the same screen click Edit. This brings up the Tags tab.

9. In the Name slot, type something like Platoon FR - Players (I use FR to stand for Friendly, EN to stand for Enemy, etc. Just helps orginization.)

10. Once you have typed in your name, click Add and then click Close.

11. When you are back at the last tab, click on the selection pull-down thingy, and select your new tag you just made from the list. 12. Now, above that, click the little 'platoon' tab near the top of the same tab. Now, instead of choosing a tag from the list, click Edit next to the dimmed boxed at the bottom of this tab. At the list on the top, select GetPlayerPlatoon from it. Click OK.

13. Click OK again. This will take you back to the main script block. You should now have something that looks like this:

Group: <Default>

Comment:

01: init

Trigger Event:

The simulation is starting.

Responses:

Set Platoon FR - Players to (The player-controlled platoon).

What this basically does is assign a tag to the player's team. You do not have to do this, but it saves so much time. For instance, if you want to script something to happen when a member of the player team gets to a certain area, instead of having to do a query and say the-player-controlled-platoon, you can just select your tag from the list. YOU SHOULD DO THIS FOR ALL OF YOUR MISSIONS.

Now, for the rest of the scripting.

Lets work some more on this same startup block. All we need to do is to add a new response to our init block. So...

1. Click Add under Responses.

2. Select QueueLoopActorsInPlatoon. This response is used to loop over every person in a specified platoon.

3. For the 'platoon' tab, select your player's team tag from the list. Then, for the 'group' tab, click edit while you have that tab selected. This brings up the tag menu.

4. Create a new group by first typing in a name, something like 'Hide Player AI Loop'.

5. Click Add, and then click Close.

6. Click OK again, and then exit out of this script block.

7. Create another script block. This time, at the top, click on the group list and select your Hide Player AI Loop group from the list.

8. In the comment space, type something like 'hide player ai loop'.

9. For the Trigger Event, select LoopActors.

10. Now, this next part may be a little complicated. Here's how it works. While you have LoopActors selected, click Edit to bring up the Tags menu. You will see that at the top it says ActorRef (Actor reference). Create a new tag called something like 'Next Player' and click Add. Then click Close.

11. For the LoopActors pull-down list, select your new tag (Next Player) from the list. Click OK.

12. The engine uses this tag as a handle. You might not think that it will work, since the reference 'Next Player' is not bound to an object, but the editor engine uses this tag as a handle for the loop. Now we will create a new response.

13. Under Responses, click Add and select from the list 'BlockPreserve'. You will use this response a lot in the future. It tells the engine to let this trigger happen more than once, so, e.g., if you want something to happen every time a player comes near an area, you will need to add a BlockPreserve response at the beginning of your block. Otherwise, the trigger will only go off once.

14. Click OK and then add another response. Select ContinueIf from the list. ContinueIf's use logic. Leave the first pulldown list as True. Now, select Edit, and from the list, select CompareThings. Under the 'thing1' tab, select your Next Player tag. Under 'thing2' tab, click Edit next to Query, and select GetPlayerActor from the list. Under 'equality' tab, select 'is not equal to'. Click OK.

15. Click Close again. Now add another response. From the list, select HideThing. Select your Next Player tag from the list. Click Close or OK and you should have a new script block that looks like this:

Group: Hide Player AI Loop

Comment:

hide player ai loop

Trigger Event:

An actor loop is ready to process Next Player.

Responses:

Allow this block to be reactivated.

Continue executing responses if (Next Player is not equal to (The player-controlled actor)).

Hide Next Player from the game world.

This block will tell the engine to run a loop, or scan, over all of the people in the player's team. It then tells it to hide every actor in the platoon that it is looping over, unless the next player it loops is the human-controlled player. Once you understand it, it will be much simpler. This is all you need to do to hide the player AI. If you have any more questions feel free to ask me.

Edited by rileyfletcher_01
Link to comment
Share on other sites

I think the only way to get actors to move without plans is by spawning an assault force in the pre-startup block. This is how a Firefight script is set up, since you cannot place actual actors easily through a script. An assault force attacks the map's player insertion zone automatically, but you can't choose where they are plcaed. To add some unpredictability to a mission, you could, of course, use random elements to make it more difficult.

Link to comment
Share on other sites

Now that I have done most of the missions scripting I only need to know how to get the player into a vehicle. If I can't get that working successfully I have a backup plan. But I'm not sure if it's possible. Is there a way to have the player dead but without the mission ending?

Link to comment
Share on other sites

Oh, a side note, if you use the loop that I showed you, you HAVE to put a AvatarSwitchingOff response in the beginning block, because if the player tries to switch players, it will crash because all other avatars are hidden.

Okay, to answer your questions.

TO LOAD PLAYERS INTO VEHICLE:

1. Place a vehicle at the extraction, or wherever you want the player to be picked up at.

2a. If you want the vehicle to move after the players get in it, follow all of the 2 steps. If not, skip the rest of the 2 steps.

2b. On the right side of the editor, select the category 'Trigger Plans'

2c. On the left side of the editor, go to Misc and then create a plan. Name that plan something like 'Extraction Vehicle Exit Route" or whatever. Make sure that you put the plan in the Trigger Plans category and not under a specific team or vehicle.

2d. Click the Plans tab, and add in a Speed plan under your new vehicle's plan. For the speed, put 3ms. Then put a Path in your plan. To create a path, start by holding Ctrl and clicking where you want the vehicle to move. To add more steps to the path, hold SHIFT and click. Make sure that the lines that connect the path steps don't cross over any collision walls, and don't keep them too far apart. Most vehicles cannot go over 3ms without crashing, so try to keep them going slow, especially on turns

2e. Create a new platoon and team in your friendly company. Make sure that Allied is checked so they will be friendly to the players. In the new team you made, put an actor like a US Soldier, and then give him a plan with an Enter Vehicle, and set the vehicle for the extraction vehicle. Make sure you check Driver so that he will get in it and drive it. You should probably also make him invincible and invisible so he won't get shot and he can't drive you away. Tanks and helicopters can move without drivers, but trucks cannot..

3. To load the player into the truck, open the script editor and create a new block. In the new block, put the trigger as ProximityPlatoon, and for the platoon, select the player platoon, and for the range, put in something like 2m, and select the name of your extraction vehicle for the location. Now, for the responses, add a VehicleLoadPlatoon, and for the platoon, select the player platoon, and for the vehicle, select your extraction vehicle. Your entire script should look like this, except with some more that you put in yourself. This is just a summary of what I've taught you.

Group: <Default>

Comment:

01: init

Trigger Event:

The simulation is starting.

Responses:

Set Platoon FR - Players to (The player-controlled platoon).

Prevent players from changing avatars.

Make Actor AL - Truck Driver invincible.

Make Actor AL - Truck Driver undetectable.

Use Hide Player AI Loop to loop over all actors in Platoon FR - Players after this block.

Group: <Default>

Comment:

load player

Trigger Event:

A member of Platoon FR - Players is within 2 meter(s) of Vehicle AL - Player Extraction Truck.

Responses:

Place all members of Platoon FR - Players in Vehicle AL - Player Extraction Truck.

Assign Plan - PET Path to Vehicle AL - Player Extraction Truck and execute.

Group: Hide Player AI Loop

Comment:

hide player ai loop

Trigger Event:

An actor loop is ready to process Next Player.

Responses:

Allow this block to be reactivated.

Continue executing responses if (Next Player is not equal to (The player-controlled actor)).

Hide Next Player from the game world.

Have Next Player commit suicide.

Link to comment
Share on other sites

Continue executing responses if (Next Player is not equal to (The player-controlled actor)).

Hide Next Player from the game world.

Have Next Player commit suicide.

This may crash your game. You are trying to kill actors that have been hidden, not good. Never hide and then give a script command to them, always command first, then hide last. Obviously no need to hide dead actors though.

This works fine:

Continue executing responses if (Next Player is not equal to (The player-controlled actor)).

Have Next Player commit suicide.

:)

Link to comment
Share on other sites

I can't seem to find the VehicleLoadPlatoon response. I am assuming that will be because I haven't used any of the patches yet. If it is I will probably have to put this part of the mission on hold until my internet is sped back up. I'll start working on the other missions for now.

Is there a way to also set the players actor with a script? I have tried some scripting but it didn't work.

Edited by Cookie857
Link to comment
Share on other sites

OK, first of all, I don't think the patch affects IGOR. The VehicleLoadPlatoon response is at the very bottom, next to WeatherChange. Secondly, you can assign a tag to the player-controlled actor, but I think this only works in Singleplayer. You will have scripting issues in multiplayer using the player-controlled actor tags, but for singleplayer, this is how you do it.

1. Make a new response in your startup block, a VariableSetActor.

2. Create a variable like 'Actor FR - Player'.

3. On the actor tab of the VariableSetActor response, click Edit next to Query, and select from the list 'GetPlayerActor'.

4. Your new response should say something like this:

Set 'Player Actor' to (the player-controlled actor)

---------

About your post above, yes, you can make it where the game does not end when all players are dead. In the startup block (or wherever you want) create a response and select 'DisableAutoendNoPlayers'. So, when all of the Ghosts die, the game will never end. I assume you have a plan for using this, because if you don't create another block that fails the mission, the players will have to manually leave the game; not very good. More details, please.

Good luck, sounds like you're doing great on it.

Link to comment
Share on other sites

what happens if you hide the actors and you look at the in-game Soldier Stat thing? Will they show in there or not?

They will still show they are there, soon as you select 1 you will CTD. Again you cannot ask the engine to do something with a hidden asset.

Link to comment
Share on other sites

I have tried to set up a basic "Ambush" script where the player gets to the extraction zone and enemies that were hidden are no longer hidden and attack the players. I have tried to set it up so the player has to survive for 2 minutes, and in those two minutes the enemies keep respawning. The script I tried is not working and I was wondering if anyone could read over it and see what I did wrong.

Trigger Event:

ExtractionTimer has expired.

Responses:

Cancel execution of any plan assigned to Enemies - Platoon 2 - Backstreet.

Cancel execution of any plan assigned to Enemies - Platoon 2 - Backstreet1.

Cancel execution of any plan assigned to Enemies - Platoon 2 - Cave.

Cancel execution of any plan assigned to Enemies - Platoon 2 - Cave1.

Disable the Enemy Respawn script blocks.

Mark Hold off the ambushers complete in the objective list.

Group: Enemy Respawn

Comment:

Trigger Event:

A member of PlayerPlatoon is within 5 meter(s) of Extraction Zone.

Responses:

Set ExtractionTimer to expire in 120 second(s).

Make Enemies - Platoon 2 - Ambushers visible to the game world.

Assign Enemies Backstreet Plan to Enemies - Platoon 2 - Backstreet and execute.

Assign Enemies - Cave plan to Enemies - Platoon 2 - Cave and execute.

Assign Enemies - Cave Plan1 to Enemies - Platoon 2 - Cave1 and execute.

Assign Enemies Backstreet Plan1 to Enemies - Platoon 2 - Backstreet1 and execute.

Mark Get to the extraction zone complete in the objective list.

Add Hold off the ambushers to the objective list.

Group: Enemy Respawn

Comment:

Trigger Event:

All members of Enemies - Platoon 2 - Ambushers have been killed.

Responses:

Spawn (The platoon including Actor 68) onto Enemies.

Group: Extraction

Comment:

Trigger Event:

A member of PlayerPlatoon is within 5 meter(s) of Extraction Zone.

Responses:

Display "Well done" and register mission completion.

End the game and display ""

Link to comment
Share on other sites

The SpawnCompany, Platoon, Team, or Actor responses do not function as a respawn response. If you spawn a platoon that already exists, it will not work. You have to create a new variable, spawn it, and create a team for every six men you want, like this:

Group: <Default>

Comment:

Respawning

Trigger Event:

All members of Enemies - Platoon - Ambushers have been killed.

Responses:

Spawn Enemies - Platoon - Reinforcements A onto Company - Enemies.

Spawn Enemies - Team - RA1 onto Enemies - Platoon - Reinforcements A.

Spawn Enemies - Team - RA2 onto Enemies - Platoon - Reinforcements A.

Spawn Enemies - Actor - RA1-1 onto Enemies - Team - RA1 with "c01_a_1a.atr" and "ak47 only.kit" at Zone - Reinforcement Insertion.

Spawn Enemies - Actor - RA2-1 onto Enemies - Team - RA2 with "c01_b_1a.atr" and "rpk74 grenades.kit" at Zone - Reinforcement Insertion.

Remember, only six actors for each team. This takes a good deal of time, but if you want actors to be spawned, you'll have to do it this way. Depending on the circumstances, it might be alot easier just to have a reinforcement platoon hidden, and use a ShowThing response when you're ready. That way, you could have a bunch of soldiers and not have to make a response for every individual.

Link to comment
Share on other sites

I have finished the first mission! I have posted a download link if anyone wants to test. I'm not sure if it's 100% finished, but that will mostly be cleaning up and organising everything, and fixing any bugs. I'll probably allow the enemy to see a little further in the final game. It uses the original POW camp map.

http://www.mediafire.com/?fe27mr8cn0n394q

Also I will be needing a helicopter model for the second mission and I am not too picky.

Edited by Cookie857
Link to comment
Share on other sites

Okay, first off, I'd be glad to test this afternoon or when I get the chance, and secondly, there is a UH-60 Blackhawk model with Island Thunder if you have it. Do you have Island Thunder? Because if you don't, modding will be a lot harder. It's not necessary, but I would suggest it.

It's great to see someone else modding for Ghost Recon 1 again. I thought there were only a couple left, including me.

Okay, just did a runthrough on A01. It was really intense at some points when the patrols got close; with a little more work it'll be a really nice stealth mission. Here's my complaints:

Waypoints didn't match up to proper locations on command map on briefing screen. To fix that, go to Misc, and place a new waypoint for each objective point (e.g. the weapon cache or the extraction zone). Now, on the pull down tab, select the right objective number. 0 is 1, 1 is 2, 2 is 3, and 3 is 4. I know, a little confusing but that's how IGOR works.

Briefing had a few grammar errors; nothing intolerable though.

Objective shots were for the wrong map. Fix this by going to the Briefing properties, and for Cycle Image select the m11_brfg_box from the Briefings folder in Origmiss.

The doctor had a PDA and was smoking it.....don't know if that's what you wanted or not.

The doctor didn't really care that I walked past him and his guard.....you might set the guard and doctor's alertness setting to Bored with a Set, not Lock. Lock makes an actor forced to do that, but Set only tells them to do that, but gives them free choice if they are engaged by hostile forces. This would make it more realistic than being able to walk right past the guard.

You should be more specific about picking up a weapon.....you made it sound like it was an objective to get the pistol out of the drawer, but you spawn with it. I believe you meant pick up a weapon from the armory, but that wasn't very clear. Just maybe change objective to Obtain weapons from armory.

Also, in your scripting I noticed you have no comments; that doesn't matter, but it helps orginization alot if you use comments.

You do not have to have an EndGameAll and a DeclareMissionComplete response together; just a DeclareMissionComplete will end it. No need for anything else.

Besides that, everything was pretty good (all though I'm not so sure about those refugees in the bathroom :lol: )

Keep up the good work.

Link to comment
Share on other sites

CTD when I approached the weapons cache from the north first time. The second time I approached the weapons cache from the south. I was almost there when it happened.

Last line from ike.log:

RSFILEDATA: FindFile could not find file ak47_m1911.kit

D/l'ed the mod from the link in post #20.

Activated DS, IT and your mod.

Link to comment
Share on other sites

I must have forgotten to put that back in, sorry about that. The doctor smoking the PDA, that was also me forgetting to give him a custom kit. I don't have Island Thunder or Desert Siege.

Anyway thanks for your help and I have uploaded the fixed version. I also added some extra enemies into the Medium and Hard difficulties.

http://www.mediafire.com/?eljn8iblsuf2e5e

There won't be any progress on this for a while. My GPU decided to die, I can't use the game editor and I might not be able to get a new one for a while.

Edited by Cookie857
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...