PDA

View Full Version : TC FraggleScipt stuff


Exl
May 31st, 2003, 02:28 AM
For a TC project of which I will keep the name shut I'm working on doing some simple changes (call it hacks if you must) to the Legacy engine. In this process I have added several FraggleScript functions that may be of use to the people who like to make those scripted movies with Legacy.
Now, I don't know how my C coding style would compare to that of the Legacy team members, but I am willing to share these functions into the next version of Legacy if possible. There aren't many of them but they could be useful:
<BLOCKQUOTE><font size="1" face="Trebuchet MS, Arial, Helvetica, serif">code:</font><hr width="100%" size="1" noshade><pre>new_function("setobjstate", SF_SetMobjState);
new_function("fadeback", SF_FadeBack);
new_function("lockconsoleplayer", SF_conlockplayer);
new_function("unlockconsoleplayer", SF_Unconlockplayer);
new_function("clearconhud", SF_ClearConHUD);</pre><hr width="100%" size="1" noshade></BLOCKQUOTE>

------------------
WhackEd 1.23.199 (http://home.wanadoo.nl/dennis.meuwissen/whacked)

Here's to the ways of life -- death, decay and cheese!

Hurdler
May 31st, 2003, 02:54 AM
You can always send your source code and if it doesn't break anything we can add it to the coming release.

We might change the syntax or reject a function if there are better ways to do it (to avoid having too much functions when possible and having a clean API)

------------------
Member of the DooM Legacy Team

ToXiCFLUFF
May 31st, 2003, 03:49 AM
Sweet stuff Exl. Can you actually set an object's frame state then? Because that would be awesome!!! Especially once we can call scripts via mobj states, this will add a lot of possibilities.

Is there any chance you could commit this to the CVS, because some of this stuff would be really useful in my platform mod?


//edit: What is fadeback btw?

Exl
May 31st, 2003, 04:26 AM
Let me explain them a bit closer then:

setobjstate: Exactly as Toxicfluff said, you can set a mobj's state with this, I beliebe it's just a simple call to P_SetMobjState

fadeback: With this you can create actual screen fades that fade to black. Problems are; it only works in OpenGL and the way I added it to the source was simply by adding some paremeters to a hardware rendering function (something called MenuScreenFadeBack from the top of my head), specifically the amount of alpha.

lockconsoleplayer and unlockconsoleplayer (playerlock\unlock would be shorter+better i guess): a simple functions that sets\unsets a variable in the engine which will block out all player input from input devices to the game (which means the menu and console still work).

clearconhud: A simple call to a console function from the engine, can't remember it's name right now. This one clears all messages that are currently being displayed in the console HUD on top of the game screen.

Edit: Of course I'm sure there will be better ways to implement these functions as I made more or less quick changes to the engine because it's just for a TC. Maybe DarkWolf can implement them instead?

------------------
WhackEd 1.23.199 (http://home.wanadoo.nl/dennis.meuwissen/whacked)

Here's to the ways of life -- death, decay and cheese!

DarkWolf
May 31st, 2003, 06:14 AM
setobjstate sounds good, although it would probably be implemented as objstate(mobj target, [int state]) so you can return and set the state.

What are the parameters passed for lockconsoleplayer and unlockconsoleplayer?

clearconhud might be a bit redundant, runcommand("cls\n").

fadeback sounds interesting, although there's probably a better way to implement it. Hurdler would probably have to take a look at it since I'm not familiar with the renderer.

------------------
-DarkWolf

Boingo the Clown
May 31st, 2003, 06:42 AM
new_function("setobjstate", SF_SetMobjState);

Does this mean that I can specify if a monster is asleep, or active, or in pain, or even dead at the beginning of a level?

If so, then I have a use for this function.



------------------
The Epidermis Emporium (temporary site until teamdeim.com is back up) (http://members.fortunecity.com/doomskin/index.html)
TEAMDEIM.COM (http://www.teamdeim.com)
The Team DeiM Forums (http://pub80.ezboard.com/bteamdeim)
The Boingo Page (http://www.geocities.com/boingo_the_clown/)

Rellik_jmd
May 31st, 2003, 07:59 AM
Those all sound useful, it'd be nice to have a way of just turning all messages off so no text ever appears at the top of the screen.

------------------
DOOM Legacy Website Guy (http://legacy.newdoom.com/)
Webmaster The Legacy Editing Resource (http://legacy.newdoom.com/der/).
Webmaster Discharge! DeathMatch Level Reviews (http://www.telusplanet.net/public/daewoo/server/).

Aliotroph?
May 31st, 2003, 11:53 AM
I thought DooM already had that option Rellik. If it's still in Legacy I figured it would be a cvar or something.

DarkWolf
May 31st, 2003, 11:58 AM
showmessages

0: Off
1: On
2: Not All

=P

------------------
-DarkWolf

Rellik_jmd
May 31st, 2003, 12:00 PM
Really? There's a third option? Heh, I didn't know that. http://forums.newdoom.com/UBB/tongue.gif

------------------
DOOM Legacy Website Guy (http://legacy.newdoom.com/)
Webmaster The Legacy Editing Resource (http://legacy.newdoom.com/der/).
Webmaster Discharge! DeathMatch Level Reviews (http://www.telusplanet.net/public/daewoo/server/).

DarkWolf
May 31st, 2003, 12:08 PM
It has been there for as long as I can remember.

------------------
-DarkWolf

ToXiCFLUFF
June 1st, 2003, 06:56 AM
Excellent, with the [un]lockplayer functions, we can finally eliminate the stupidity of being able to turn around in cutscenes and keep people completely still http://forums.newdoom.com/UBB/smile.gif

------------------
http://www.geocities.com/toxic_fluff/rustlogo.txt (http://www.geocities.com/toxic_fluff/RUST/index.htm) Check it out.

Exl
June 1st, 2003, 07:14 AM
while(1)
{
objmomx(trigger, 0);
objmomy(trigger, 0);
objmomz(trigger, 0);
wait(3);
}

:P

------------------
WhackEd 1.23.199 (http://home.wanadoo.nl/dennis.meuwissen/whacked)

Here's to the ways of life -- death, decay and cheese!

DarkWolf
June 1st, 2003, 07:31 AM
Or slient teleport them to a 64x64 room that's off to the side of the map.

------------------
-DarkWolf

ToXiCFLUFF
June 1st, 2003, 03:59 PM
Neither of those work. Not when your character is in a conversation with another character what I was talking about. And even with the objmom()s the player can spin around and around.

Rellik_jmd
June 1st, 2003, 04:06 PM
You can also load a new configuration that unbinds all their movement keys and disables the mouse. That's what I do. Let me know if you want the .cfg file.

------------------
DOOM Legacy Website Guy (http://legacy.newdoom.com/)
Webmaster The Legacy Editing Resource (http://legacy.newdoom.com/der/).
Webmaster Discharge! DeathMatch Level Reviews (http://www.telusplanet.net/public/daewoo/server/).

ToXiCFLUFF
June 1st, 2003, 05:42 PM
What happens if they load a custom cfg before playing though, or change a setting ingame? For instance, I have various configuration files (as well as the standard autoexec.cfg and config.cfg), which I load for different maps/gametypes etc, I would expect that you use an exec [x].cfg command after the cutscene was over, and in either of the above scenarios, the new settings would not be reloaded.

I wouldn't wanna include anything in a map which could possibly break compatibility, you see.

Exl
June 2nd, 2003, 10:46 AM
So how exactly do I go about sending in the code then? CVS access would be too much of a request, and it would also mean I have to separate the TC's more gameplay-changing functions from the FS stuff...

------------------
WhackEd 1.23.199 (http://home.wanadoo.nl/dennis.meuwissen/whacked)

Here's to the ways of life -- death, decay and cheese!

Hurdler
June 2nd, 2003, 03:01 PM
if you want CVS acces, I can give it to you, if you prefer sending the source code by e-mail, that's fine too. please contact me by e-mail for that stuff.

------------------
Member of the DooM Legacy Team