Custom Scripts Thread

Discussion in 'Game Play' started by Metal Smith, Mar 20, 2008.

  1. Metal Smith

    Metal Smith Member

    Messages:
    4,520
    Likes Received:
    3
    Trophy Points:
    0
    Idea behind this thread is to discuss and provide custom scripts that can be used for individuals or LANs or even active servers to either test out or try out. The idea is that the scripts can just be pasted into the script.txt file without much trouble.

    Any editing of a script can be placed anywhere (almost) in the script and still work. the way the scripts are set up, they are currently very organized. I suggest if you place any scripts into your game, you add them at the very bottom of the script file, with this format:


    //************
    // Custom Scripts
    //************

    "Place it here"
    {
    GL HF MB
    }

    //***********
    //END CUSTOM
    //***********

    That will keep the actual game code separate from your own code that you insert into the game, and make it easily recognizable.

    In a minute, I'm going to add a script for an idea I would like to see implemented, just as an example, and paste in a script file to show what I mean.

    I think this thread, once people see what you can do when you know how, will slow the amount of suggestions and stuff because people will realize how you can change things without needed to have access to the hard code. Nukes for example, people could modify that slightly, see how it works, and maybe discuss exactly what changes have worked best, or put in more informed opinions on how the change will affect the game.

    Anyhow, delete this thread if it is too pointless.
     
  2. Metal Smith

    Metal Smith Member

    Messages:
    4,520
    Likes Received:
    3
    Trophy Points:
    0
    Okay, heres the first script I wanted to post, the idea was posted in my suggestion thread for a better 1 slot cannon. Heres what i've done to mess with it in a server on my own:

    Research Tree should have this added in somewhere to make it a researchable item:

    and the following should be added somewhere to the vehicles_weapons script:

    Those are both in the attached txt file.

    This is more or less the idea of the thread. The above does work. as long as people don't spam random scripts into the thread, i can personally try out every script someone adds, so long as it does not need additional models or sounds.


    *NOTE* although some of the lines in the quote spill over onto another line, it should copy and paste out into the original format when using notepad*

    *NOTE* if it doesn't, every line should start with something in quotes.

    *Final NOTE* If you don't understand what the {}'s are for, don't try editing the scripts. you'll never do it right.
     

    Attached Files:

  3. Metal Smith

    Metal Smith Member

    Messages:
    4,520
    Likes Received:
    3
    Trophy Points:
    0
    Okay, here are some modifications to both the research cost of nukes, as well as the damage and such of the weapon.

    Idea is simple. Lower cost, increase damage.

    The explosion force and radius I thought were fine. Damage was upped by 40.
    research cost was drastically reduced, but the weapon cost was increased as well. I have also added .1 to the gravity so that the slow moving heavy huge missile will eventually hit the ground if fired straight.

    I've increased the accuracy (by lowering the spread a touch).

    The changes are based upon 3 layers of comp armor (apc). With comps damage reduction of .85, it should take about 204 damage to it's armor side exposed, and leave about a half or a quarter plater on the exposed side. Second shot will probably kill anything with less than 3 layers with a direct hit.

    Will still take 4 hits to destroy buildings.
     
  4. Jephir

    Jephir ALL GLORY TO THE JEPHIR

    Messages:
    1,409
    Likes Received:
    6
    Trophy Points:
    0
    Sorry if this is a stupid question, but can server owners use this script to modify the game for clients on their servers?
     
  5. Demented

    Demented Member

    Messages:
    2,337
    Likes Received:
    0
    Trophy Points:
    0
    Sort of.
    If you add extra weapons, clients won't be able to use them unless they also have the very same custom weapons in the very same order.

    When selecting a weapon for your vehicle, the game uses a number to identify the weapon. This number is the weapon's order in the vehicle_weapons.txt file. There are 32 weapons, so if you add a weapon to the bottom of the list, that will make it weapon 33.

    If the client has a custom missile launcher, but the server has a custom artillery cannon, both weapon #33, the client won't be able to use either custom weapon since the server will think he's trying to build a tank with an artillery cannon in its missile slots.

    For the preexisting weapons, similar issues will apply.
    I.e. If the server has Metal Smith's nuke modifications, the clients will still display nukes as being 150c, but when they try to buy a tank the server will charge them 250c and deny them if there aren't enough resources.
     
  6. Metal Smith

    Metal Smith Member

    Messages:
    4,520
    Likes Received:
    3
    Trophy Points:
    0
    weapons will always go with server as far as damage and such, but I didn't realize that the weapons were assigned numbers.

    obviously, everyone would have to have the same file setup, otherwise they won't see it on their GUI's. They would still be there, but the vehicle selection I think is all client side when selecting it.

    BTW, research might also be affected in the same way, so if you add your own stuff, make sure that you do not add to a tree that already has full rings or stick it in the middle of them. I've had problems going from LAN to pub and not being able to select research tree's because of this.

    I'm trying to figure out a way to not have to add it directly into the vehicles_weapons.txt file, but no luck so far.
     
  7. Mr. Weedy

    Mr. Weedy I will report bugs on the bug tracker

    Messages:
    2,291
    Likes Received:
    0
    Trophy Points:
    0
    Rifled Cannons are only for NF?
     
  8. Sherbie

    Sherbie Member

    Messages:
    441
    Likes Received:
    0
    Trophy Points:
    0
    The AFV is of no use after you get mediums or heavies, cause it's so fucking huge and easy to hit... :U Contrary to the light tank, it's awesome to annoy even advanced BE tanks with it, hindering them from retreating when they are damaged... xD

    I think the AFVs should be made smaller and have these extra seats removed, no one uses them anyhow, if any rushes are made they're done with APCs...
     
  9. Metal Smith

    Metal Smith Member

    Messages:
    4,520
    Likes Received:
    3
    Trophy Points:
    0
    Indeed, it was suggested to make this the first team specific research item/weapon because it is only useful in a light tank, as all 2 slot weapons work better than this one does, either with more damage or less heat, or both. that and the general consensus that the BE AFV was the fugliest vehicle in the game atm. It servers it's purpose, but it's still fugly.
     
  10. Sherbie

    Sherbie Member

    Messages:
    441
    Likes Received:
    0
    Trophy Points:
    0
    Another reason for restricting this to NF is obviously epic rifled cannon BE heavy sixshooters... they could fire about one salvo before having to cool down, but they'd deal like 330 damage...
     
  11. Metal Smith

    Metal Smith Member

    Messages:
    4,520
    Likes Received:
    3
    Trophy Points:
    0
    meh, 330 damage, it would take 22 shots to destroy a completed building. so 4 rounds after completely cooling. not worth it.

    also, it takes advanced coolant to be able to shoot 20 shots without overheating, when I tried it on a LAN.
     
  12. Starcitsura

    Starcitsura Member

    Messages:
    417
    Likes Received:
    0
    Trophy Points:
    0
    Code:
    "Biological Artillery"
    	{
    		"Name"			"Biological Artillery"		//name given when selecting weapons
    		"HUD Name"		"BIO AC"			//name displayed in the weapon area of the vehicle HUD
    		"Description"		"An artillery cannon with a biological payload."		//description given when selecting weapons
    		"Icon"			"vehicles/gui/weapons/ac_med"		//icon drawn in the GUI
    		"HUD Icon"		"vehicles/gui/weapons/ac"
    		"Size"			"2"		//number of slots required when selecting weapons
    		"Type"			"2"		//0=machine gun, 1=tank cannon, 2=artillery cannon, 3=missile launcher, 4=grenade launcher, 5=aircraft bomb bay
    		"Cost"			"76"
    		"Team"			"ALL"		//team that can use this "NF" or "IMP"
    		"Research"		"Biological Warhead"		// Should be replaced with its own research
    		"Sound Firing"		"Vehicle_AC.Fire"
    		"Sound Impact"		"Vehicle_AC.Impact"
    		"Sound Reloading"	""
    
    		"Ammo Type"		"0"		//for mguns only, 0 = nonarmor penetrating (no effect on armored vehicles), 1 = armor penetrating (hurts armored vehicles)
    		"Damage"		"50"		//damage done by projectile
    		"Speed"			"2200"		//speed of projectile
    		"Gravity"		"0.8"		//effects of gravity on the projectile, only for projectiles
    		"Heat"			"15"		//heat added per shot fired (100 total heat added to vehicle puts it in an overheated status).
    		"Weight"		"100"		//weight in terms of effects on engine and weight restrictions for chassis
    		"Cycle Time"		"3.0"		//time between shots
    		"Clip Size"		"10"		//ammo loaded per reloads
    		"Total Ammo Clips"	"8"		//max ammo clips carried (0 is the same as not using clips)
    		"Reload Time"		"10.0"		//time to load one clip
    		"Projectile Spread"	"0.001"		//only applicable to machine guns at the moment
    		"Heat To Target"	"1"		//heat added to target on hit (a small amount of heat is also added to the target based on damage, this is defined within the armor script)
    		"Inertia"		"1"		//actually reverse to inertia, only applicable to cannons, artillery cannons, and grenades; affects how the speed of the vehicle affects the momentum of the projectile (higher inertia = vehicle speed will affect the trajectory of the projectile possibly causing it to veer off from a straight line or shoot farther or shorter)
    		"Explosion Radius"	"900"		//radius of damage sphere to hurt surrounding entities
    		"Explosion Force"	"700"		//force of explosion
    
    
    			//only for missile launchers
    		"Dumb Missile"		"0"		//'1' if missile flies straight ahead
    		"Homing Missile"	"0"		//'1' if missile flies towards locked on target
    		"Guided Missile"	"0"		//'1' if missile follows crosshairs after launch
    		"Missile Range"		"0"		//max range in HL2 units (1 inch = 1) that the player can lock onto a target with a homing missile, or range from vehicle being fired from when a guided missile stops following the player's crosshairs
    		"Lock On Time"		"0"		//time it takes for a homing missile to lock onto the target under the player crosshairs
    		"Lock Range Modifier"	"0"		//modifies lock on time based on range (as range increases, lock on time increases based on the modifier: modifier * range to target + lock on time = total lock on time)
    
    		//for biological weapons: when a player or vehicle is hit, the damage (Damage) is inflicted every specified amount of seconds (Interval) over a total amount of time period (Time)
    		//all weapons can use these, explosions will infect all players and vehicles the explosion touches, not just the direct hit target
    		"Player Bio Damage"	"10"	//damage inflicted to players every interval
    		"Player Bio Time"	"60"	//total time to inflict damage to players
    		"Player Bio Interval"	"1"	//time inbetween each infliction of damage to players
    		"Vehicle Bio Damage"	"10"	//damage inflicted to vehicles every interval
    		"Vehicle Bio Time"	"60"	//total time to inflict damage to vehicles
    		"Vehicle Bio Interval"	"1"	//time inbetween each infliction of damage to vehicles
    
    		//explosion effects
    		"Explosion Speed"	"10"	//how fast the explosion sprite fades (15 is default fps)
    		"Explosion Sprite"	"1"	//explosion sprite to use for explosion, 0 = default, 1 = green (bio), 2 = blue (plasma)
    	}
    This one is fun to shoot yourself with...
     
  13. Metal Smith

    Metal Smith Member

    Messages:
    4,520
    Likes Received:
    3
    Trophy Points:
    0
    lol 10 second insta death.

    you may want to lower the damage on infantry with that one, to maybe 5 at the most, and maybe make the interval 1.5, and the vehicle stuff looks alright. I think....

    the radius and force are insane though >_>
     
  14. Starcitsura

    Starcitsura Member

    Messages:
    417
    Likes Received:
    0
    Trophy Points:
    0
    I pretty much copied the HE lol...
    Its hard to test with just playing with yourself, if someone was to use it to something, then yeah that balancing would be a good idea. Perhaps even slowing the rof
     

Share This Page