Frictional Games Forum (read-only)
How do "you" organize your .hps files? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: How do "you" organize your .hps files? (/thread-22354.html)

Pages: 1 2


How do "you" organize your .hps files? - GoreGrinder99 - 08-08-2013

I was curious as to the different ways you all organize your .hps files. Mine are rather sporadic and scripts all over the place in order I had created them in. I've seen others use things like \\\\\Note\\\\\, \\\\\Voice\\\\\ and such, I'm sure you know what I'm saying, different categories for all their files. I'm personally looking for a setup that is simply easy to locate certain scripts and allow it to be clearer as to where things are. Does anyone have a customized template they'd like to share or suggest? I can find everything because I know where I put it but I know in the long run it would be more beneficial for me as well as others who will eventually obtain my mod.


RE: How do "you" organize your .hps files? - Kreekakon - 08-08-2013

Besides the basics of not typing your code all over the place, most of the time I personally just find using the stuff you mentioned like \\\\\Note\\\\\, \\\\\Voice\\\\\ to be enough to keep myself organized. .hps files can get quite large, but very rarely do I ever run into a situation where such a way of organizing is unfeasible.


If your .hps does get ridiculous for whatever reason though, I guess you could add a table of contents at the start, and ctrl+f to where you want easier. Like this:


Code:
/////////////////
1a Hit
2a Scary
3a OogyBoogy
////////////////////////

//////////////1a Hit
void blahblah
{
}

//////////////2a Scary
void blahblah2
{
}

///////////////////3a OogyBoogy
void blahblah3
{
}



RE: How do "you" organize your .hps files? - GoreGrinder99 - 08-08-2013

(08-08-2013, 03:06 AM)Kreekakon Wrote: Besides the basics of not typing your code all over the place, most of the time I personally just find using the stuff you mentioned like \\\\\Note\\\\\, \\\\\Voice\\\\\ to be enough to keep myself organized. .hps files can get quite large, but very rarely do I ever run into a situation where such a way of organizing is unfeasible.


If your .hps does get ridiculous for whatever reason though, I guess you could add a table of contents at the start, and ctrl+f to where you want easier. Like this:


Code:
/////////////////
1a Hit
2a Scary
3a OogyBoogy
////////////////////////

//////////////1a Hit
void blahblah
{
}

//////////////2a Scary
void blahblah2
{
}

///////////////////3a OogyBoogy
void blahblah3
{
}

Ahh, a table, good idea. I was thinking maybe one for every category in the Engine scripts wiki page or something.


RE: How do "you" organize your .hps files? - Rapture - 08-08-2013

(1) When you are assigning names us a naming convention that is easily recognizable and re-usable.

(2) I prefer to order my .hps in the way the player might interact with them. So top is things they might hit into early on, bottom for later stuff.

(3) Line things up, if you have a bunch of...
Code:
AddPlayerBodyForce(   2,    2,    2, true);
AddPlayerBodyForce(   4,    4,    4, true);
AddPlayerBodyForce(   8,    8,    8, true);
AddPlayerBodyForce(  16,   16,   16, true);
AddPlayerBodyForce(  32,   32,   32, true);
AddPlayerBodyForce(  64,   64,   64, true);
AddPlayerBodyForce( 128,  128,  128, true);
AddPlayerBodyForce(2048, 2048, 2048, true);
line them up, it makes reading and figuring out minor errors so much easier!


RE: How do "you" organize your .hps files? - PutraenusAlivius - 08-08-2013

Well for me it's like Kreekakon's format.
Example.
NOT TO BE USED SINCE JUST EXAMPLE.
Code:
void OnStart()
{
AddUseItemCallback("", "FirstDoor", "KeyOne", "UnlockDoor", true); ///---01---///
AddEntityCollideCallback("Player", "Area", "ScriptOne", true, 1); ///---02---///
}

///---Unlock Door Script---///---01---///
void UnlockDoor(callback syntax)
{
}
///---Unlock Door Script---///---01---///
///---Entity Collide Script---///---02---///
void ScriptOne(callback syntax)
{
}
///---Entity Collide Script---///---02---///

But, each script has a code respective to their callback parameter so I know what callback calls what function.

EDIT: Err, Kreekakon not Rapture.


RE: How do "you" organize your .hps files? - Kreekakon - 08-08-2013

@JAP: Actually I think you don't need to use that method as you can really just search the function name itself as they don't usually repeat lol


RE: How do "you" organize your .hps files? - PutraenusAlivius - 08-08-2013

(08-08-2013, 05:08 AM)Kreekakon Wrote: @JAP: Actually I think you don't need to use that method as you can really just search the function name itself as they don't usually repeat lol

Yeah, but I used a lot of functions so tracking it will be hard since there could be some parameters that share the same function.


RE: How do "you" organize your .hps files? - Damascus - 08-08-2013

I like to group things up by events like this. Makes it easier to find things when I know what event it's associated with.

///////////////////////
// FLASHBACK
////////////////////////

stuff

///////////////////////
// CHARGE ORB
////////////////////////

stuff

//////////////////////
////////////////////////////
// Run first time starting map
void OnStart()
{
}


RE: How do "you" organize your .hps files? - GoreGrinder99 - 08-08-2013

Thanks for the input! I'll get to it tomorrow and see what happens, work in a few hours. -_- lol


RE: How do "you" organize your .hps files? - The chaser - 08-08-2013

Pretty much like the others said, but in my case, I prefer to organize myself with complicated events:

For example:

void OnStart()
{
//Bunch of things
}

///MONSTER SCARE EVENT///
void bla (bla)
{
//blablabla
}


///EVENT TIMER CHALLENGE///
void bla (bla)
{

}