UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

[User Tutorial] Adding soul chests (like BO2-Origin's) to your map + UGXmod tut

HOT
broken avatar :(
Created 10 years ago
by BluntStuffy
0 Members and 1 Guest are viewing this topic.
35,717 views
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
Signature
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
http://www.youtube.com/watch?v=mKPBYWpEIzk#ws

1-First download the file from the end of this post and extract it.
Copy the contents of the "copy to raw folder" into your \game_root\raw\ folder,
and copy the contents of the "copy to mods mapname folder" into the \game_root\mods\name-of-the-map-to-install-to\
(example: nazi_zombie_factory ).
The download contains the models, animations and animtree for the chest, soundalias files. The FX files and the script ofcourse. Choose one:

2-Open your mapname.gsc file (you can find it in \raw\maps\), copy it into your mods\mapname\maps\ folder.
--->if your using UGX-MOD it's already in your mods/mapname folder<-----
Open it and find the line:

Code Snippet
Plaintext
maps\_zombiemode::main();

above this line you add:

Code Snippet
Plaintext
maps\_soul_chest::PreCache_soul_chest();

and below this line you add:

Code Snippet
Plaintext
thread maps\_soul_chest::main();

An example of how it should look (your mapname.gsc might look diffent, so don't copy this code!)

example before:

Code Snippet
Plaintext
    /*--------------------
     ZOMBIE MODE
    ----------------------*/
    [[level.DLC3.weapons]]();
    [[level.DLC3.powerUps]]();
    maps\_zombiemode::main();
   
    /*--------------------
     FUNCTION CALLS - POST _Load
    ----------------------*/
    level.zone_manager_init_func = ::dlc3_zone_init;
    level thread DLC3_threadCalls2();


example after:

Code Snippet
Plaintext
    /*--------------------
     ZOMBIE MODE
    ----------------------*/
    [[level.DLC3.weapons]]();
    [[level.DLC3.powerUps]]();
    maps\_soul_chest::PreCache_soul_chest();
    maps\_zombiemode::main();

    thread maps\_soul_chest::main();
   
    /*--------------------
     FUNCTION CALLS - POST _Load
    ----------------------*/
    level.zone_manager_init_func = ::dlc3_zone_init;
    level thread DLC3_threadCalls2();



3a. FOR NON UGX-MOD users: if you're using UGX-mod got to step 3b and ignore this one!!
Open (first copy to mods folder from raw/maps and/or make a backup!) your _zombiemode_spawner and find the line:

Code Snippet
Plaintext
self.flame_damage_time = 0;

right below that line, add these:

Code Snippet
Plaintext
if( level.chest_active == true )
    {
    self thread death_watch();
    }

   

next go all the way to the end of the file and add this:

Code Snippet
Plaintext
death_watch()
{
    self waittill( "death" );
    last_origin = self.origin;
    area_radius = undefined;
    soul_chest_area = getentarray( "soul_chest_area" , "targetname") ;
   
    for(i=0;i<soul_chest_area.size;i++)
    {
    area_radius = soul_chest_area[i].radius;

        if( self IsTouching( soul_chest_area[i] ) )
        {
         soul_chest_area[i] thread maps\_soul_chest::chest_death_count( last_origin, area_radius );
         break;
         }

        else
        {
        }
    wait 0.05;
    }
}


save and close the file.


3B. FOR UGX-MOD users!!:
Open ugx_mod.iwd (with winRAR) go into the maps folder and find your _zombiemode_spawner.gsc (make a backup!!!)
Open it, and find the line:

Code Snippet
Plaintext
self maps\ugxm_powerups::decide_powerup();

right below that line, add these:
Code Snippet
Plaintext

if( level.chest_active == true )
    {
    self thread death_watch();
    }

next go all the way to the end of the file and add this:

Code Snippet
Plaintext
death_watch()
{
    self waittill( "death" );
    last_origin = self.origin;
    area_radius = undefined;
    soul_chest_area = getentarray( "soul_chest_area" , "targetname") ;
   
    for(i=0;i<soul_chest_area.size;i++)
    {
    area_radius = soul_chest_area[i].radius;

        if( self IsTouching( soul_chest_area[i] ) )
        {
         soul_chest_area[i] thread maps\_soul_chest::chest_death_count( last_origin, area_radius );
         break;
         }

        else
        {
        }
    wait 0.05;
    }
}


save and close the file. winRAR will ask you iff you want to update the archive, click yes for your changes to have effect!


4.-go to your \game_root\zone_source\ folder and find yourmapname.csv Leave it where it is, so make a backup before editing. Open it and at the end add the following:


Code Snippet
Plaintext
//BluntStuffy's Soul Chest's
rawfile,maps/_soul_chest.gsc
rawfile,animtrees/blst_soul_chest.atr
sound,blst_soul_chest_1,,all_sp
sound,blst_soul_chest_2,,all_sp
fx,blst_custom/blst_fx_chest_soul
fx,blst_custom/blst_fx_chest_idle
xmodel,blst_soul_chest
xmodel,blst_soul_chest_active
xanim,blst_soul_chest_open
xanim,blst_soul_chest_close_notfull
xanim,blst_soul_chest_close_full
xanim,blst_soul_chest_idle01
xanim,blst_soul_chest_idle02
xanim,blst_soul_chest_idle03
xanim,blst_soul_chest_idle04
xanim,blst_soul_chest_idle05
xanim,blst_soul_chest_idle06

That should be the scripting part. In radiant open your map. First we'll make the chest locations:

-create a trigger_radius and give that the KVP's:

Code Snippet
Plaintext
targetname - soul_chest_area

Click the spawnflags "AI_AXIS" and "NOTPLAYER",
Make sure it's flat on the floor. The chest will appear with it's center on the center of the trigger_radius.
The arrow (when rotating the trigger) points to the front side of the chest. Adjust the radius and height for
that trigger to suit your needs. Every zombie that dies touching that trigger will feed the chest.

-Next create a script-brushmodel and give it the "clip" texture. you want to make it about 104 units wide (x-axis) and 90 units 'long' (in the y-axis) make sure it's high enough so players can't get on top off it and MORE IMPORTANT: make it so the square box representing the trigger_radius you created in the previous step is COMPLETELY INSIDE the clip-brush. Once you did all that give the clip-brush the KVP's:

Code Snippet
Plaintext
targetname - soul_chest_clip

You can simply copy these two entities for all the chest's you want to make. The kvp's for all chests are the same. (the stock script supports up to 6 chest locations without any editing, although you might want to set the amount of kills yourself. You can do this in the _soul_chest.gsc file (i've marked where to edit stuff). Every chest can have it's own radius and height.

-Next create 4 triggers (don't make more, that may cause issue's) where the players can pick up their reward when done filling up all the chest's (the ray-guns in the stock script).
Make those trigger_use and give the KVP's:

Code Snippet
Plaintext
targetname - soul_chest_reward

The center of the trigger is where the ray-gun appears. The amount of players in the game is equal to the amount of ray-guns that will spawn. A player can only pick up a free ray-gun once, if they already have a raygun if refills the ammo for it, once.

Things you want to know:
-The standard time-out timer for a chest is set to 50 seconds, you can change this in _soul_chest.gsc
-this is what the stock kill-requirements are, look for these lines to change them. You can change the kills required for each chest in _soul_chest.gsc.


Code Snippet
Plaintext
//////////////////////////  EDIT AMOUNT OF KILLS NEEDED HERE 
    chest_1_kills = 12;
    chest_2_kills = 25;
    chest_3_kills = 45;
    chest_4_kills = 65;
    chest_5_kills = 90;
    chest_6_kills = 140;
///////////////////////  EDIT AMOUNT OF KILLS NEEDED HERE ////////////////////////////

-Dog's do not fill up chest's (so a dog round probably times out a chest, like the robots closed a chest in origins when
standing on it)
-When 2 or more chest's are activated at the same time, and one of them time's out and closes while other chest's are completed the amount of kills needed when reactivating the timed-out chest could have increased one level. I'll explain:
Say: you got 4 chest's
first one activated require's 4 kills
second one require's 8 kills
third require's 12 kills
fourth require's 16 kills

*when you activated chest 1 and 2 at the same time, and finished both of them without time-out's. it took you 12 kills, right!

*now when you activate chest 1 and 2 at the same time and let ONE of them time out:
-In the case the first chest you activated times out, and you completed the second one, that one took you 8 kills.
now when you reactivate chest 1 (or another remaining chest) that one will also require 8 kills to fill instead of 4.

-When the second chest you activated timed out, nothing changes

That should be the worst case scenario, i decided to keep it that way. It could add some difficulty for players that are trying to fill multiple chest's at the same time and fail..

That's all, remember to select all new files in the MOD-Builder when compiling!

Also note, i have no scripting background whatsoever. I'm doing this for a few months now, and if i did things that are 'not done' or if you find any bugs please let me know. Happy mapping/modding!

If you use this tutorial for your map credit is appreciated, and it would maybe even be more appreciated if you would send me a link or message if your level is released. Would love to check out other map's with my script's in it!! ;)
Last Edit: December 30, 2013, 02:32:22 am by BluntStuffy
broken avatar :(
×
broken avatar :(
Location: tr
Date Registered: 1 March 2013
Last active: 4 days ago
Posts
816
Respect
Forum Rank
The Decider
Primary Group
2015 Contest Winner
My Groups
More
My Contact & Social Links
More
Personal Quote
Caw caw caw
×
johndoe's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
2015 Contest Winner
johndoe's Contact & Social Linksmyc153-johndoe
you're freaking awesome mate! keep up the good work.
broken avatar :(
×
broken avatar :(
Location: usUsa
Date Registered: 21 July 2013
Last active: 1 month ago
Posts
53
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
lordkurt6's Groups
lordkurt6's Contact & Social LinkstehfeedzPryZeWaRVii
thank you sooo much mateee iv allreally added it to my map it work just fine thank you and could you make bo2-origins genater don't how spell it hmm there 6 of them u need power them all up so u can pap weapons and it give u a reward in your custom chest box so the real one anyways thank you
broken avatar :(
×
broken avatar :(
The Doctor
Location: gbUnited Kingdom
Date Registered: 26 March 2013
Last active: 1 year ago
Posts
1,448
Respect
Forum Rank
Zombie Colossus
Primary Group
Donator ♥
My Groups
More
×
timelordalex's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
timelordalex's Contact & Social Links
 i take it you can change the ray gun right, i mean that wouldnt really be a worthwhile reward for me, rather have the mark 2 or something
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
i take it you can change the ray gun right, i mean that wouldnt really be a worthwhile reward for me, rather have the mark 2 or something


Sure, you can change whatever you want.. Most changes would have to be made inside the _soul_chest.gsc that's included in the download. I've made some notes inside the file, telling what to change. Just scroll through and you'll see them..
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
why are you using gamefront? I can't download this.
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
why are you using gamefront? I can't download this.

my bad, added a mediafire link to the OP
broken avatar :(
×
broken avatar :(
Donator <3
Location: auAustralia
Date Registered: 20 August 2012
Last active: 4 years ago
Posts
337
Respect
Forum Rank
Perk Hacker
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
×
Chunkdogg9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Chunkdogg9's Contact & Social LinksChunkdogg9Chunkdogg00Chunkdogg9
So if I wanted to use this with the ugx mod how would I go about doing that? Cause I want to have this in my map but after completing it you get a hell retriever but only one shows up but all players can pick up one.
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
Not sure how this would work with UGX-mod, and i realize that's kind off lame when posting it on a UGX forum  :P 
It's just my map doesn't use UGX, and i initially created if for my own map..

Perhaps if someone who's familiar with UGX-mod can tell right away if there are things that need to be changed.
Otherwise i will make a test map this weekend and install UGX on that to see how it works out.
I'll get back to it this weekend!
broken avatar :(
×
broken avatar :(
Donator <3
Location: auAustralia
Date Registered: 20 August 2012
Last active: 4 years ago
Posts
337
Respect
Forum Rank
Perk Hacker
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
×
Chunkdogg9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Chunkdogg9's Contact & Social LinksChunkdogg9Chunkdogg00Chunkdogg9
Not sure how this would work with UGX-mod, and i realize that's kind off lame when posting it on a UGX forum  :P 
It's just my map doesn't use UGX, and i initially created if for my own map..

Perhaps if someone who's familiar with UGX-mod can tell right away if there are things that need to be changed.
Otherwise i will make a test map this weekend and install UGX on that to see how it works out.
I'll get back to it this weekend!

Thanks man. Funny thing is I was making 2 maps before origins came out and my 2nd map I was making is kinda like origins haha so it would fit in so good with that map
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
Tested with UGX mod, and made a few changes to the tutorial, shouldn't be shocking though..
Worked the first time! Let me know if you have any problems!
broken avatar :(
×
broken avatar :(
Donator <3
Location: auAustralia
Date Registered: 20 August 2012
Last active: 4 years ago
Posts
337
Respect
Forum Rank
Perk Hacker
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
×
Chunkdogg9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Chunkdogg9's Contact & Social LinksChunkdogg9Chunkdogg00Chunkdogg9
Tested with UGX mod, and made a few changes to the tutorial, shouldn't be shocking though..
Worked the first time! Let me know if you have any problems!

Thanks a lot man I will definitely be putting this in my map now.
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
NP, let me know if you got any problem's!!
broken avatar :(
×
broken avatar :(
Location: dk
Date Registered: 30 July 2011
Last active: 4 years ago
Posts
53
Respect
Forum Rank
Rotting Walker
Primary Group
Community Mapper
My Groups
More
×
cinnober's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
cinnober's Contact & Social Links
NP, let me know if you got any problem's!!

I´ve added one chest in a test map.

The chest works fine but when it dissapear then the clip still remains. Should it not be deleted also ??
Otherwise there a clip blocking for no reason ?
broken avatar :(
×
broken avatar :(
Location: nlApeldoorn
Date Registered: 17 December 2013
Last active: 1 year ago
Posts
1,187
Respect
1,404Add +1
Forum Rank
Zombie Colossus
Primary Group
Community Scripter Elite
My Groups
More
My Contact & Social Links
More
Personal Quote
It aint much, if it aint Dutch
×
BluntStuffy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
Oil Rig Beta Access
Oil Rig Beta Access
BluntStuffy's Contact & Social LinksBluntstuffy@BluntZombieBluntStuffyStuffyZombie
The chest works fine but when it dissapear then the clip still remains. Should it not be deleted also ??
Otherwise there a clip blocking for no reason ?

Yep, it should disappear. Did you make sure the trigger was completely inside the clip like the screenshot below.

Spoiler: click to open...


 
Loading ...