Frictional Games Forum (read-only)
Updating script support, taking requests - 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)
+--- Thread: Updating script support, taking requests (/thread-22612.html)

Pages: 1 2 3 4 5 6 7 8


RE: Updating script support, taking requests - The chaser - 08-28-2013

I was thinking in a function to change gravity:

void ChangeGravity(1); ///Default

And being able to change the global fog settings from the game ("press P if you want to enable culling, to improve performance").

A gramatical corrector in the .lang file if possible



RE: Updating script support, taking requests - felixmole - 08-28-2013

(08-28-2013, 06:29 AM)Thomas Wrote:
(08-28-2013, 01:38 AM)LHudson Wrote: Bit vague and not very technical, but the ability to spawn monsters and allow them to patrol without their patrolling music playing, but with the soundtrack of that room playing. For example.

10_amb is playing, but a monster spawns. 10_amb is still playing but dan_grunt doesn't.

I think this is already possible by making a new ent file for the monster where the ambient music is empty ("").

Yes, that's what is used on Amnesia: Justine with Malo, IIRC.


RE: Updating script support, taking requests - Karba - 08-28-2013

You can already script that Undecided
and thats what i like about the editor.

Its like a puzzle when all functions are not preset, and you get more inspired and motivated when you manage to make it yourself.

its no fun when you can make all the cool stuff by writing a single line.

I'm good at misunderstanding stuff but im posting this anywayz,
please dont make amnesia into Little big Planet Frictional Games Wink


RE: Updating script support, taking requests - Javist - 08-28-2013

This thread lifted up my mood, unexpectable Smile
Would like to support Apjjm's list.
It's covers almost everything that i lacked.

Also, i have one own suggestion for consideration:
It's something like #include directive. Would be very great.
Atm we can use custom pre-processors for that, but.. nevertheless.. Smile

Quote:its no fun when you can make all the cool stuff by writing a single line.
Well, maybe. But as a programmer i prefer clean and reusable code, without crutches, bicycles and re-inventions of wheels. In simple words - D.R.Y Rule.


RE: Updating script support, taking requests - Patrik - 08-28-2013

Some nice suggestions so far. Keep them coming! Smile

(08-27-2013, 12:29 PM)JustAnotherPlayer Wrote: Can you make the if-else function that the parameter could turn Integers to Bools and vice-versa?

Could you rephrase this? Not sure I understand exactly.


RE: Updating script support, taking requests - Javist - 08-28-2013

Quote: Can you make the if-else function that the parameter could turn Integers to Bools and vice-versa?
Quote:Could you rephrase this? Not sure I understand exactly.
Well.. i may mistake here, but i think, he's probably talked about the C-like "feature".
if(1), while(1), bool b = 0 ..etc.
In this case, something like this one can become handy Smile
Spoiler below!
Code:
bool toBool(int i)
{
    return i;
}
bool toBool(const char* str)
{
    return str!=NULL && strlen(str);
}
int fromBool(bool b)
{
    return b;
}




RE: Updating script support, taking requests - Bridge - 08-28-2013

(08-28-2013, 05:44 PM)Javist Wrote:
Quote: Can you make the if-else function that the parameter could turn Integers to Bools and vice-versa?
Quote:Could you rephrase this? Not sure I understand exactly.
Well.. i may mistake here, but i think, he's probably talked about the C-like "feature".
if(1), while(1), bool b = 0 ..etc.
In this case, something like this one can become handy Smile
Spoiler below!
Code:
bool toBool(int i)
{
    return i;
}
bool toBool(const char* str)
{
    return str==NULL || strlen(str);
}
int fromBool(bool b)
{
    return b;
}


Isn't toBool(const char* str) broken? I don't see how it could ever return "strlen(str)" the way it's structured at the moment. Also, what is the purpose of such a function? There's no way for it to judge whether strings are true or not so how would it actually decide what value to convert strings to? The other functions look equally useless to me (in a nutshell, integers greater than zero become 1 and integers equal to zero become 0, right?) - although I'm not familiar with AngelScript per se so maybe this is a useful operation.


RE: Updating script support, taking requests - Javist - 08-28-2013

Bridge, Umm, well.. probably that function for string is really superfluous as their scope of application is very limited. It's just like that.
And yes, lol, it Was broken. My mind flew off somewhere, 10x Smile
Quote:how would it actually decide what value to convert strings to?
At this point can't say anything, dunno if AngelScript are supporting overloading of functions.
Quote:The other functions look equally useless to me (in a nutshell, integers greater than zero become 1 and integers equal to zero become 0, right?)
Yep, something like that. Anything that is not 0 is True(1).
Not sure if they're useless it's just a shorthand for "if(someInt == 1)", "bool b = (val == 1)" etc.
Unimportant thing, but let it be (:


RE: Updating script support, taking requests - The chaser - 08-28-2013

(08-28-2013, 05:26 PM)Patrik Wrote: Some nice suggestions so far. Keep them coming! Smile

Patrik, this thread is perhaps the best one I've ever had the honor to post in... and it's really good to know FG keeps modders in mind Smile
How about a script that can move areas, or transform them, like:

SetAreaAtPosition(0, 0, 0, "world"); //floats would be the position in the map
SetAreaMovement(0, 0, 0, 2 "world"); // 0 floats would be the position in the map to arrive at
///Bold would be the speed from the area, 1 should be 1 second

or:

SetAreaProperties("Area", 0, 0, 0, 0, 0, 0, 0, 0, 0, "world");

Bold:
Position
Italic: Rotation
Underlined: Scaling

Also:

AttachAreaTo("Object");


RE: Updating script support, taking requests - palistov - 08-29-2013

I'm not sure if this has been mentioned but please add support for including other Angelscript modules/files. That would be a great!

Also if player input can be sent to the script as a set of callbacks that'd be neat. There are lots of neat things I used to try to do that required key press callbacks, but had to hack together a way of detecting WASD input using script areas and such.

Disable/enable player lean left/right function.


Change the speed of time much like Justine introduced changing global sound speed.

Expand AI behavior. Change hostile/non-hostile, perhaps add ability for them to move to or attack entities like barrels or other NPCs. I remember I wanted to make an NPC-like entity which would follow the player around. I ended up hacking up a really messy implementation by using a cockroach with a negative flee rate, so it ended up following the player instead of running away.

Treat the player more like a true entity. I can't perfectly recall but some functions don't treat the player like an entity. Just checked: GetEntitiesCollide doesn't support the player, would be nice if it did!

That's all I can think of right now. Been a while since I've modded TDD. I've since forgotten my pet peeves with the scripting interface for HPL2.