Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » scripts.dll 2.1
scripts.dll 2.1 [message #132110] Fri, 14 January 2005 03:52 Go to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

Here is the current to-do list for scripts.dll 2.1.
If anyone has anything else to add to it, please let me know ASAP so I can start to lock down the new features list.

new scripts:
the JFW_Slot_Machine script someone requested before.
JFW_Attach_Script_Preset_Once_Custom
JFW_Attach_Script_Type_Once_Custom
JFW_Attach_Script_Once_Custom
These do the same as the regular versions but wont attach if its already attached
JFW_Domination_Zone_End_Game which is designed to end the game when all the zones are held by a particular player.
JFW_Attach_Script_Preset_Created_Custom which will attach the script to all objects of <preset> when the script starts up. And it will also attach it to any new objects of <preset> when those objects are created. Also, it will only attach the script to any given object once.
JFW_Attach_Script_Type_Created_Custom which is like the previous one but for a specific type.
Any scripts other people write and submit to me
Any scripts required for Reborn

Engine Calls:
bool Is_Script_Attached(GameObject *obj,const char *script)
void Attach_Script_Once(GameObject *obj,const char *script,const char *params)
void Attach_Script_Preset_Once(const char *script, const char *params, const char *preset, int team)
void Attach_Script_Type_Once(const char *script, const char *params, int type, int team)
int Get_Radar_Mode()

These do just what they say.

bhs.dll patches:
the linux IP address fix fix
a hook for Post_Load_Level (so a script can hook into level start and do stuff)
a hook for "player has joined"
a hook for "player has left"
a hook for "object has been created"
the keyboard hook code I have mentioned before
<some stuff I dont want to reveal right now>

console commands:
Mine Linit Change fix
Mine Limit Display
Player Limit Display
Player Limit Change
Current Mine Count Display
Map Name Display
Map Rotation Display
Map Rotation Changing
Change Time Remaining
Time Remaining Display
get radar mode
the snd3dt command that I wasnt able to get working for 2.0
music
no music
music private
no music private
get scripts.dll version (well actually it will get the version of bhs.dll that is on the server)
taunt
vehicle lock
vehicle unlock

plus, also, the renegade bug fixing stuff (such of it as needs to go into bhs.dll/scripts.dll) being planned for Core Patch 2

If anyone wants anything else made, let me know ASAP. This includes other mod teams that want stuff for their mod.
Also remember that (as usual) this list is tentative and not everything on it will necessarily be made.

EDIT:
mac has informed me that we have a virtually complete defintion of the GameData class (which is the main class used to hold data like the map rotation, player count, server name, SFPS and a bunch of other things) and that we have code to read from and write to this.
That means that we dont need a specific char *Get_Current_Map() command anymore so that is gone.
There will now be commands and stuff to work with the game data.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
scripts.dll 2.1 [message #132112] Fri, 14 January 2005 04:19 Go to previous messageGo to next message
Oblivion165 is currently offline  Oblivion165
Messages: 3468
Registered: June 2003
Location: Hendersonville, North Car...
Karma: 0
General (3 Stars)
I know alot of people have wanted this, including me, there may even be a script for it by now but placing active mines.

WOL: Ob165ion Skype: Oblivion165 Yahoo Instant Messenger: CaptainJohn165
scripts.dll 2.1 [message #132114] Fri, 14 January 2005 05:12 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

placing active mines, will look into that for 2.1

Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
scripts.dll 2.1 [message #132145] Fri, 14 January 2005 14:49 Go to previous messageGo to next message
Alkaline is currently offline  Alkaline
Messages: 1132
Registered: November 2003
Karma: 0
General (1 Star)
Deleted
the donate command... will servers still crash if somone tries to donate to somone if they havn't loaded yet?

scripts.dll 2.1 [message #132206] Sat, 15 January 2005 05:11 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

ok, some further stuff
1.JFW_Give_Powerup_Create wich will give <powerup> to the object its attached to when the script is created
2.JFW_Invincible_On_Create which makes whatever it is stuck on invincible for a set period of time after it is created
3.JFW_Attach_Script_Player_Created which is like JFW_Attach_Script_Type_Created and JFW_Attach_Script_Preset_Created except that instead of attaching to all objects of a specific type or a specific preset, it attaches to all players (well it will have a team parameter)
All of the 3 JFW_Attach_Script_xxx_Created will be able to attach the same script multiple times (with different parameters for example).
a script or scripts that can place active C4 (proxy C4 etc), I dont know if this is possible or not though Smile
a clone of the script Dr_Mobius_Script (mainly because it is not present in the Linux FDS)

Also, whatever engine calls are needed to go with placing an active mine will be added.
With respect to the GameData stuff I mentioned before, I will be having full implementations of the cGameData class, the cGameDataCnC class, the cGameDataSkirmish class and the cGameDataSinglePlayer class.
And I will be having usable copies of the The_Game, The_Skirmish_Game, The_Single_Player_Game and The_CnC_Game to retrieve the relavent objects for you to access.
So you will be able to do something like char *current_map = The_Game()->MapName
Alhough note that not everything has been documented (although you will be able to get to the undocumented bits if you want to).
Also, its not known what effect changing the structures will have, changing some things may have side effects or may not work right (for example changing the MaxPlayers wont work since the game keeps copies of that value elsewhere and does other things with it)


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
scripts.dll 2.1 [message #132269] Sat, 15 January 2005 13:35 Go to previous messageGo to next message
Alkaline is currently offline  Alkaline
Messages: 1132
Registered: November 2003
Karma: 0
General (1 Star)
Deleted
well how about this:
I run a DM server and while its great and all, the fact of the matter is that most maps don't have a ref and no one gets any money.

so I was wondering if it would be possible to make a script that would give people 1000 credits every 2 mins. It would have to be serverside and maybe a console command: Autocredits 1000 2000 where 1000 is the amount of credits and 2 seconds is how long the server waits to give them out to players.

this way people can buy new chars and stuff on dm maps...


scripts.dll 2.1 [message #132273] Sat, 15 January 2005 13:51 Go to previous messageGo to next message
Naamloos is currently offline  Naamloos
Messages: 771
Registered: April 2004
Location: The Netherlands
Karma: 0
Colonel
If a DM map has PT's then players have to fight for a beter char, not sit on their ass waiting to buy a n00b cannon.

If the person that made the map wanted credits to come in free he/she would have added that.

It would only fuck up DM gameplay IMO.
scripts.dll 2.1 [message #132604] Mon, 17 January 2005 04:19 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

ok, some more things that will be in 2.1:

The Get_Radar_Mode engine call is gone since you can grab the radar mode from the cGameData stuff I have added.

Some of the scripts mentioned in this thread will require engine calls (not all of which will be listed since I wont know the details untill I write and test the script)

Obviously the IP address fix and mine limit change fix are in 2.0.1 so they will cary over to 2.1

There are 2 new scripts similar to JFW_Attach_Script_Player_Created called JFW_Attach_Script_Building_Created and JFW_Attach_Script_Vehicle_Created that do just what they say.
One sticks the script on every building controler in the game when the building controler is created.
And the other sticks the script on every vehicle in the game when the vehicle is created.
They (like the other script attach stuff) will have settings to set which team you want them to work for (or both)

JFW_Destroy_Self_Timer which basicly will, when created, start a timer.
When the timer expires, the object with JFW_Destroy_Self_Timer on it will be destroyed.

JFW_Change_Model_Health which will, when the health of what its attached to goes below a certain amount, change the model of whatever its attached to one model.
Then when it goes back over the health amount, it changes to another model and so on.

JFW_Dplbl_Vhcls_Keyboard which is exactly like the latest delpoyable vehicle script from KGB except that it will feature a keyboard hook to destroy instead of the current way of doing it.

JFW_Spawn_Object_Poke_Custom which will spawn an object when poked.
Then, it will disable itself untill a custom is sent to it allowing another object to be spawned.

JFW_Spawn_Object_Poke_Timer is like JFW_Spawn_Object_Poke_Custom except that instead of a custom re-enabling it, it has a timer that starts when the object is spawned that re-enables it when the timer expires.

JFW_Spawn_Object_Poke is like the other 2 but it doesnt get disabled (so you can use it as many times as you like)

All 3 will have parameters to specify where the object is to be spawned.
JFW_Jetpack is a script a bit like JFW_Flying_Infantry except that there will be a keyboard hook to enable and disable the "fly" effect.

JFW_Caryable_Vehicle is a script that goes onto every vehicle you want to be caryable by a vehicle carying vehicle (e.g. caryall, transport etc).
Basicly, it takes 2 pieces of information. The custom to listen for from the caryall vehicle. And the size of an imaginary rectangular prisim around the vehicle which contains the whole vehicle within it. This is used so that when the caryall grabs the vehicle, it doesnt get to close.

JFW_Caryall is a script for something like a vehicle caryall or a transport.
The caryall has an imaginary rectangular prisim around the vehicle (for example, for an Orca Caryall, it will be below the vehicle). Then, the caryall activates via a keyboard key. When activated, if no vechicle is connected to the caryall, it will search the area bounded by the invisible rectangular prisim for a vehicle of the appropriate team. If none is found, nothing happens.
If one is found, settings on the caryall are combined with settings from the vehicle (which will be retrieved by sending the custom to the vehicle) to determine where relative to the caryall vehicle that the vehicle being picked up should go. It is then moved there and attached to the caryall. It will also be locked so that people cant get out of the vehicle (firing will still work though since I cant turn that off and also the vehicle will be made immobile so it cant move if I can figure out how). When you arrive at the destination, the keyboard key will be pressed again and the vehicle will be detatched and (optionally) moved a certain distance in the x,y,z direction.

This script is going to be harder than I thought it would be (especially if I want to make it generic enough to handle different places of vehicle attachment and stuff), I need to handle the rotation of the vehicle in x,y,z too.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
scripts.dll 2.1 [message #132605] Mon, 17 January 2005 04:54 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

also:
JFW_Hunter_Seeker which is a script that will, when created, pick one of 3 waypaths at random.
It will then trigger a "follow waypath"
When this is completed, it will search for a nearby unit and will proceed to go to their location and explode.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
scripts.dll 2.1 [message #132721] Mon, 17 January 2005 18:11 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

change JFW_Change_Model_Health
It will now work like this
When thing with JFW_Change_Model_Health on it gets hit below x health, it changes to <model>
add JFW_Change_Model_Health2 which is like JFW_Change_Model_Health except it changes when it goes above <health>


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
scripts.dll 2.1 [message #132730] Mon, 17 January 2005 18:57 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

ok, the "get bhs.dll server version", "music", "no music", "music private" and "no music private" console commands are coded.

Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
scripts.dll 2.1 [message #132740] Mon, 17 January 2005 19:39 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

I have just added code to make renegade not read *.dep files (well actually it simply changes the string from .dep to .xxx and from always.dep to xxxxys.dep so that it looks for non existant files now.
Speeded up the loading nicely Smile


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
scripts.dll 2.1 [message #132780] Tue, 18 January 2005 00:02 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

ok, I have added commands to display the current map name, current mod package (if any), current radar mode plus the map name at any index (from 0 to 99) within the map list (if any) and the index of the current map in the list.

Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
scripts.dll 2.1 [message #132781] Tue, 18 January 2005 00:18 Go to previous messageGo to next message
cokemaster is currently offline  cokemaster
Messages: 144
Registered: April 2003
Karma: 0
Recruit
I don't post much here, but is it possible to show the radio commands - in a form where moderation bots/IRC bots can read it?

Might be handy but maybe not. Maybe its just offtopic.


Remember, Friends don't let friends play Reborn!
scripts.dll 2.1 [message #132783] Tue, 18 January 2005 00:25 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

ok, mine limit display and current mine limit display for a given team are both in.

Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
scripts.dll 2.1 [message #132785] Tue, 18 January 2005 00:27 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

no its not possible to display the radio commands.

Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
scripts.dll 2.1 [message #132796] Tue, 18 January 2005 01:59 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

ok, the new stuff for accessing the cGameData stuff is in & working.
Some things (like player limit and time limit) are not simple to change.
But you can change the map list no problems.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
scripts.dll 2.1 [message #132927] Tue, 18 January 2005 16:28 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

ok, I looked into spawning an active mine and it cant be easily done.
So I wont be putting that into 2.1


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
scripts.dll 2.1 [message #132952] Tue, 18 January 2005 17:51 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

For the vehicle locking, I am adding one console command to make it work:
EJECT <playerid> which ejects that player from whatever vehicle they are in (if they are in one)
Also, the "taunt" command is gone and wont be done.

So, the (currently) final list of console commands to be added to 2.1 is:
Already coded:
map name display
mod package name display
map number display
map list display
get radar mode
music
no music
music private
no music private
get bhs.dll version
mine limit display
current mine display

not coded yet:
map list changing
snd3dt
eject

not coded yet but will be if I/we can find the right data to change
player limit display
player limit change
change time remaining/time limit
time limit/remaining time display


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
scripts.dll 2.1 [message #132989] Tue, 18 January 2005 19:55 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

ok, eject, map list change and snd3dt are coded and (like everything else that I have coded so far) seems to work in my own tests.
More testing (on a server for example) will probobly be needed for some of this stuff though before its ready for release.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
scripts.dll 2.1 [message #133102] Wed, 19 January 2005 18:20 Go to previous messageGo to next message
Blazea58 is currently offline  Blazea58
Messages: 408
Registered: May 2003
Karma: 0
Commander
Wow these are all great updates, i must say the Gambling script will be the most needed for me, in the gta map as thats the main source of getting money. Can you explain how exactly it would work though, because from what i wanted was you go up to the slot machine and press E, then depending on a number it randomly selects you either win or loose money.

I don't know much about scripts , but i would like to hope it can work out that way.


Another thing i was pondering on is if there is a way to possibly change the set amount of credits. Like for my map i would really like it if you start with 0 dollers no matter what, even if the host picks 99999, maybe there is a script that takes all of it away?

Basically just a script that either takes away money, or forces you to start with 0 Laughing


http://i175.photobucket.com/albums/w125/Blaze558/ECW_WebBanner1.jpg
scripts.dll 2.1 [message #133107] Wed, 19 January 2005 19:08 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

Gambling script will work like that.
As for the credits thing, no, I cant do that.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
scripts.dll 2.1 [message #133135] Wed, 19 January 2005 20:50 Go to previous messageGo to next message
vloktboky is currently offline  vloktboky
Messages: 290
Registered: February 2003
Location: Kentucky, USA
Karma: 0
Recruit

Blazea58

Another thing i was pondering on is if there is a way to possibly change the set amount of credits. Like for my map i would really like it if you start with 0 dollers no matter what, even if the host picks 99999, maybe there is a script that takes all of it away?

Basically just a script that either takes away money, or forces you to start with 0 Laughing


Create a map structure with two entries, a string and a boolean value. Fill the map with all of the player's names, and mark each boolean value for each entry false. Reset this map structure on every map load. On a player's creation using any script attached to them, look up the player in this map structure and check its respected boolean value. If it's false, mark it as true and give it the opposite amount of starting credits. If you have to, you could easily look this up from the INI file. Or, if you think about it, their credits will be the starting amount when they are first created, so you could just get their money and reverse it. If you want to change it instead of just resetting it to 0, just give the player however many credits you want after you give the player the opposite amount. You could easily make it give a certain amount depending on which map was loaded here.
scripts.dll 2.1 [message #133158] Wed, 19 January 2005 22:50 Go to previous messageGo to next message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

ok, more ideas:
JFW_Clear_Weapons_Startup which will remove the weapons from whatever its atached to when the script starts up. Stick directly on infantry units or use with one of the JFW_Attach_Script_xxx_Created scripts (e.g. JFW_Attach_Script_Player_Created). Note that this removes all guns from the player, there is no way that I have yet found that will remove specific weapons from a player.
JFW_Clear_Money_Startup which will set the money of whatever its atatched to to 0 on startup
JFW_Attach_Script_Player_Join which is like JFW_Attach_Script_Player_Created except that it triggers on player join and not on "object created" where the created object is a player. So the person wanting to start with no money can use JFW_Attach_Script_Player_Join with JFW_Clear_Money_Startup as the script and it should do what is wanted.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
scripts.dll 2.1 [message #133182] Thu, 20 January 2005 03:57 Go to previous messageGo to previous message
jonwil is currently offline  jonwil
Messages: 3557
Registered: February 2003
Karma: 0
General (3 Stars)

ok, I have sucessfully implemented (and tested) the hook for CombatManager::Post_Load_Level.
This means that you can do stuff when the level has finished loading.


Jonathan Wilson aka Jonwil
Creator and Lead Coder of the Custom scripts.dll
Renegade Engine Guru
Creator and Lead Coder of TT.DLL
Official member of Tiberian Technologies
Previous Topic: C&C Islands- water in tunnels
Next Topic: buildings.zip
Goto Forum:
  


Current Time: Sat Nov 30 14:39:24 MST 2024

Total time taken to generate the page: 0.01165 seconds