Sourcemod Resources: Difference between revisions

From Empires Wiki
Jump to navigation Jump to search
mNo edit summary
 
(60 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Sitenav|Sourcemod Resources}}
[[Category:Developer_Resources]]
{{Abandoned}}
<div align="center">{{Note|This article is current for version '''2.25b'''}}</div>
{{SitenavNested|:Category:Developer_Resources|Developer Resources}}


==Empires 2.12 Indexes==
==Indexes==
===Vehicles===
===Vehicles===
//These values are returned by the m_iChassis offset of the netclass CEmpTank
<pre>//These values are returned by the m_iChassis offset of the netclass CEmpTank
//Found By Theowningone
//Found By Theowningone
0 "NF Jeep"
0 "NF Jeep"
1 "NF APC"
1 "NF APC"
2 "NF Light Tank"
2 "NF Light Tank"
3 "NF Med Tank"
3 "NF Med Tank"
4 "NF Heavy Tank"
4 "NF Heavy Tank"
5 "NF Arty Tank"
5 "NF Arty Tank"
6 "Imperial Jeep"
6 "BE Jeep"
7 "Imperial APC"
7 "BE APC"
8 "Imperial AFV"
8 "BE AFV"
9 "Imperial Med Tank"
9 "BE Med Tank"
10 "Imperial Heavy Tank"
10 "BE Heavy Tank"
11 "Imperial Arty Tank"
11 "BE Arty Tank"
12 "Imperial Commander"
12 "BE Commander"
13 "NF Commander"
13 "NF Commander"</pre>


===Vehicle Weapons===
===Vehicle Weapons===
//These values are returned by the m_iWeapon offset of the netclass CEmpTankTurret
<pre>//These values are returned by the m_iWeapon offset of the netclass CEmpTankTurret
//Found By Theowningone
//Found By Theowningone
0 "Standard Machine Gun"
0 "Standard Machine Gun"
1 "Bio Machine Gun"
1 "Bio Machine Gun"    
2 ".50 Caliber Medium Machine Gun"
2 ".50 Cal Medium MG"  
3 ".50 Caliber Heavy Machine Gun"
3 ".50 Cal Heavy MG"  
4 "Anti-Tank Machine Gun"
4 "Depleted Uranium MG"  
5 "Anti-Tank Heavy Machine Gun"
5 "Depleted Uranium HMG"
6 "Chain Gun"
6 "Chain Gun"  
7 "Medium Chain Gun"
7 "Medium Chain Gun"  
8 "Plasma Machine Gun"
8 "Plasma Machine Gun"
9 "HE MG"
9 "High Explosive MG"  
10 "Standard Cannon"
10 "Standard Cannon"    
11 "Ranged Cannon"
11 "Ranged Cannon"
12 "High Explosive Cannon"
12 "High Explosive Cannon"
13 "Plasma Cannon"
13 "Plasma Cannon"
14 "Rail Gun"
14 "Rail Gun"  
15 "smallArtilleryCannon"
15 "Small Artillery Cannon"    
16 "medArtilleryCannon"
16 "Medium Artillery Cannon"    
17 "High Explosive Artillery"
17 "High Explosive Artillery"  
18 "Ranged Artillery Cannon"
18 "Ranged Artillery Cannon"    
19 "singleMissileLauncher"
19 "Standard ML"  
20 "Upgraded Missile Launcher"
20 "Upgraded ML"  
21 "Biological Warhead"
21 "Biological Warhead"
22 "Nuclear Warhead"
22 "HIT Missile"  
23 "salvoMissileLauncher"
23 "Salvo Missile Launcher"    
24 "guidedMissileLauncher"
24 "Guided Missile Launcher"    
25 "Upgraded Guided ML"
25 "Upgraded Guided ML"
26 "homingMissileLauncher"
26 "Homing Missile Launcher"    
27 "Upgraded Homing Missile Launcher"
27 "Upgraded Homing ML"
28 "salvoHomingMissileLauncher"
28 "Salvo Homing ML"    
29 "grenadeLauncher"
29 "Grenade Launcher"  
30 "Upgraded Grenade Launcher"
30 "Upgraded Grenade Launcher"  
31 "smallBombBay"
31 "Small Bomb Bay"    
32 "largeBombBay"
32 "Large Bomb Bay"</pre>


===Research===
===Research===
//These values are returned by the Multiple Offsets of the netclass CResearchResource
<pre>//These values are returned by the Multiple Offsets of the netclass CResearchResource
//Found By Theowningone
//Found By Theowningone
1 "Physics"
0 "None"
2 "Superheated Material Physics"
1 "Physics"
3 "Plasma Cannon Projectile"
2 "Superheated Material Physics"
4 "Plasma Bullet Projectile"
3 "Plasma Cannon Projectile"
5 "Projectile Physics"
4 "Plasma Bullet Projectile"
6 "Reflective Armor"
5 "Projectile Physics"
7 "Extended Range Cannon"
6 "Reflective Armor"
8 "Heavy Caliber Machine Gun"
7 "Extended Range Cannon"
9 "Nuclear Fission"
8 "Heavy Caliber Machine Gun"
10 "Fission Reactor"
9 "Nuclear Fission"
11 "Nuclear Warhead"
10 "Fission Reactor"
12 "Chemistry"
11 "HIT Warhead"
13 "Improved Flagration Compounds"
12 "Chemistry"
14 "Explosive Tipped Bullets"
13 "Improved Flagration Compounds"
15 "Improved Detonation Compounds"
14 "Explosive Tipped Bullets"
16 "Upgraded Grenades"
15 "Improved Detonation Compounds"
17 "Explosive Shells"
16 "Upgraded Grenades"
18 "Improved Warhead Compounds"
17 "Explosive Shells"
19 "Upgraded Missile Warhead"
18 "Improved Warhead Compounds"
20 "Upgraded Grenadier RPG"
19 "Upgraded Missile Warhead"
21 "Advanced Grenadier RPG"
20 "Improved Heat Transfer Fluids"
22 "Improved Heat Transfer Fluids"
21 "Advanced Coolant Engine"
23 "Advanced Coolant Engine"
22 "Absorbant Armor"
24 "Absorbant Materials"
23 "Mechanical Engineering"
25 "Absorbant Armor"
24 "Upgraded Chassis"
26 "Mechanical Engineering"
25 "Medium Tank Chassis"
27 "Upgraded Chassis"
26 "Artillery Tank Chassis"
28 "Medium Tank Chassis"
27 "Advanced Chassis"
29 "Advanced Chassis"
28 "Heavy Tank Chassis"
30 "Heavy Tank Chassis"
29 "Advanced Machining"
31 "Artillery Tank Chassis"
30 "Composite Armor"
32 "Advanced Machining"
31 "Gas Turbine Engine"
33 "Composite Armor"
32 "Electrical Engineering"
34 "Gas Turbine Engine"
33 "Advanced Magnet Research"
35 "Electrical Engineering"
34 "Rail Gun"
36 "Advanced Magnet Research"
35 "3 Phase Electric Motor"
37 "Rail Gun"
36 "Reactive Armor"
38 "3 Phase Electric Motor"
37 "Tracking Systems"
39 "Reactive Armor"
38 "Homing Missiles"
40 "Tracking Systems"
39 "Guided Missiles"
41 "Homing Missiles"
40 "Upgraded Turrets Lvl 2"
42 "Guided Missiles"
41 "Upgraded Turrets Lvl 3"
43 "Upgraded Turrets Lvl 2"
42 "Biology"
44 "Upgraded Turrets Lvl 3"
43 "Regenerative Armor"
45 "Improved Detonators"
44 "Bio Diesel Engine"
46 "Biology"
45 "Biological Weaponry"
47 "Regenerative Armor"
46 "Biological Warhead"
48 "Bio Diesel Engine"
47 "Biological Projectile"</pre>
49 "Biological Weaponry"
50 "Biological Warhead"
51 "Biological Projectile"


===Vehicle Armor===
===Vehicle Armor===
//These values are found in Multiple Offsets of the netclass CEmpTank
<pre>//These values are found in Multiple Offsets of the netclass CEmpTank
//Found By Theowningone
//Found By Theowningone
offset+0 "Front"
offset+0 "Front"
offset+4 "Back"
offset+4 "Back"
offset+8 "Left"
offset+8 "Left"
offset+12 "Right"
offset+12 "Right"</pre>
 
===Player Classes===
===Player Classes===
//These values are found in m_iEmpClass of the netclass CSDKPlayer
<pre>//These values are found in m_iEmpClass of the netclass CSDKPlayer
//Found By Theowningone
//Found By Theowningone
0 "Scout"
0 "Scout"
1 "Rifleman"
1 "Rifleman"
2 "Grenadier"
2 "Grenadier"
3 "Engineer"
3 "Engineer"
4 "Unknown(Never Appears)"
4 "Unknown(Never Appears)"
5 "None/Spectator"
5 "None/Spectator"</pre>
 
===Squads===
<pre>//These values are found in m_iSquad of the netclass CPlayerResource
//Found By Theowningone
0 "None"
1 "Alpha"
2 "Bravo"
3 "Charlie"
4 "Delta"
5 "Echo"
6 "Foxtrot"
7 "Golf"
8 "Hotel"
9 "India"
10 "Juliet"
11 "Kilo"
12 "Lima"
13 "Mike"
14 "November"
15 "Oscar"
16 "Papa"
17 "Quebec"
18 "Romeo"
19 "Sierra"
20 "Tango"
21 "Uniform"
22 "Victor"
23 "Whiskey"
24 "X-Ray"
25 "Yankee"
26 "Zulu"</pre>
 
===Teams===
<pre>0 Unassigned
1 Spectator
2 Northern Faction
3 Brenodi Empire</pre>


==Virtual Offsets==
[http://theowningone.info/files/empires.voffsets.2.25.txt Virtual Offsets v2.25 @ theowningone.info]
==GameData==
Found by Recon and Theowningone.  To use, put in gamedata folder.<br />
[http://theowningone.info/files/core.games.txt core.games.txt @ theowningone.info]<br />
[http://theowningone.info/files/sdktools.games.ep2.txt sdktools.games.ep2.txt @ theowningone.info]
==Dump files==
===Datamaps===
[http://theowningone.info/files/empires.datamaps.2.25.txt Datamaps v2.25 @ theowningone.info]
----
===Netprops===
[http://theowningone.info/files/empires.netprops.2.25.txt NetProps v2.25 @ theowningone.info]


==Tools==
==Tools==
Offsite links only please!
===Theowningone's Empires API===
===Theowningone's Empires API===
A very useful set of functions to simplify the creation of sourcemod plugins for empires. It can be download from [[http://forums.alliedmods.net/showthread.php?p=690965 Sourcemod.net]] or [[http://files.theowningone.info//./Includes/empires.inc Theowningone.info]].
A very useful set of functions to simplify the creation of sourcemod plugins for empires.
/*
It can be download from [http://theowningone.info/files/empires.inc theowningone.info].
* Empires API
 
*
[[Category:Sourcemod]]
* Created By Theowningone
* Version: 1.1
* http://www.theowningone.info/
* http://www.borgamers.com/
*/
/********************
* --> Is Stocks <-- *
********************/
/**
* Is Player Squad Leader
*
* @param client            Client Index
* @return                1 if leader, 0 if other
*/
stock IsSquadLeader(client)
/**
* Is Player Commander
*
* @param client            Client Index
* @return                1 if comm, 0 if other
*/
stock IsComm(client)
/**
* Is Player In Vehicle
*
* @param client            Client Index
* @return                1 if in vehicle, 0 if not
*/
stock IsInVehicle(client)
/**********************
* --> Team Stocks <-- *
**********************/
/**
* Retrieves NF Resources.
*
* @return                NF Resources
*/
stock GetNFResources()
/**
* Sets NF Resources.
*
* @noreturn
*/
stock SetNFResources(amount)
/**
* Retrieves BE Resources.
*
* @return                BE Resources
*/
stock GetBEResources()
/**
* Sets BE Resources.
*
* @noreturn
*/
stock SetBEResources(amount)
/**
* Retrieves NF Reinforcements
*
* @return                NF Reinforcements
*/
stock GetNFReinforcements()
/**
* Sets NF Reinforcements
*
* @noreturn
*/
stock SetNFReinforcements(amount)
/**
* Retrieves BE Reinforcements
*
* @return                BE Reinforcements
*/
stock GetBEReinforcements()
/**
* Sets BE Reinforcements
*
* @noreturn
*/
stock SetBEReinforcements(amount)
/**
* Is Researched
*
* @param team            Team Index
* @param index            Research Index
* @return                1 if researched, 0 if not
*/
stock IsResearched(team, index)
/**
* Current Research
*
* @param team            Team Index
* @return                Research Index
*/
stock CurrentResearch(team)
/**
* Current Research Name
*
* @param team            Team Index
* @param buffer            Buffer to hold the research name
* @param size            Len of the buffer
* @return                Research Index
*/
stock CurrentResearchName(team, String:buffer[], size)
/**
* Set Research
*
* @param team            Team Index
* @param index            Research Index
* @param status            weather to research or not
* @noreturn
*/
stock SetResearch(team, index, bool:status)
/*************************
* --> Vehicle Stocks <-- *
*************************/
/**
* Get Vehicle Occupants
*
* @param ent            Vehicle Entity Index
* @return              Amount of clients in vehicle
*/
stock GetVehicleOccupants(ent)
/**
* Get Vehicle Driver
*
* @param ent            Vehicle Entity Index
* @return                Client Index of Driver (0 if none, -1 if invalid entity)
*/
stock GetVehicleDriver(ent)
/**
* Set Vehicle Armor
*
* @param ent            Vehicle Entity Index
* @param side            side of armor (1 is front, 2 is back, 3 is left, 4 is right)
* @param front            Health to set armor to
* @return                -1 on error, 0 on success
*/
stock SetVehicleArmor(ent, side, Float:health)
/**
* Get Vehicle Armor
*
* @param ent            Vehicle Entity Index
* @param side            side of armor (1 is front, 2 is back, 3 is left, 4 is right)
* @return                Armor Health (-1.0 on error)
*/
stock Float:GetVehicleArmor(ent, side)
/**
* Set Vehicle Hull
*
* @param ent            Vehicle Entity Index
* @param health            Health to set hull to
* @return                -1 on error, 0 on success
*/
stock SetVehicleHull(ent, Float:health)
/**
* Get Vehicle Hull
*
* @param ent            Vehicle Entity Index
* @return                Hull Health (-1.0 on error)
*/
stock Float:GetVehicleHull(ent)
/**
* Set Vehicle Heat
*
* @param ent            Vehicle Entity Index
* @param heat            Heat to set for vehicle
* @return                -1 on error, 0 on success
*/
stock SetVehicleHeat(ent, Float:heat)
/**
* Get Vehicle Heat
*
* @param ent            Vehicle Entity Index
* @return                Vehicle Heat (-1.0 on error)
*/
stock Float:GetVehicleHeat(ent)
/**
* Get Vehicle Class
*
* @param ent            Vehicle Entity Index
* @return                Vehicle Class (-1 on error)
*/
stock GetVehicleClass(ent)
/**
* Get Vehicle Class Name
*
* @param ent            Vehicle Entity Index
* @param buffer            Buffer to hold the vehicle class name
* @param size            Len of the buffer
* @return                Vehicle Class (-1 on error)
*/
stock GetVehicleClassName(ent, String:buffer[], size)
/**
* Get Client Vehicle
*
* @param client            Client Index
* @return                Client Vehicle Entity Index (-1 is error, 0 is none)
*/
stock GetPlayerVehicle(client)
/**
* Get Cannon Entity
*
* @param ent            Vehicle Entity Index
* @return                Cannon Entity Index
*/
stock GetCannonEnt(ent)
/**
* Get Turret Entity
*
* @param ent            Vehicle Entity Index
* @return                Turret Entity Index
*/
stock GetTurretEnt(ent)
/**********************
* --> Misc Stocks <-- *
**********************/
/**
* Retrieves a player's squad number
*
* @param client            Client Index
* @return                Player squad index (0 is none)
*/
stock GetPlayerSquadNum(client)
/**
* Retrieves a player's squad name
*
* @param client            Client Index
* @param buffer            Buffer to hold the squad name
* @param size            Len of the buffer
* @return                Player squad index
*/
stock GetPlayerSquadName(client, String:buffer[], size)
/**
* Retrieves a player's score
*
* @param client            Client Index
* @return                Player score
*/
stock GetPlayerScore(client)
/**
* Retrieves a player's class
*
* @param client            Client Index
* @return                Player class (0 is scout, 1 is rifleman, 2 is gren, 3 is engy, 5 is spec)
*/
stock GetPlayerClassNum(client)
/**
* Retrieves a player's class
*
* @param client            Client Index
* @param buffer            Buffer to hold the class name
* @param size            Len of the buffer
* @return                Player class index
*/
stock GetPlayerClassName(client, String:buffer[], size)

Latest revision as of 02:29, 11 February 2022


This article has not been updated for some time
This article has been tagged as abandoned and may be removed at some point in the future in order to keep the wiki tidy.
Note
This article is current for version 2.25b

Home > Developer Resources > Sourcemod Resources

Indexes

Vehicles

//These values are returned by the m_iChassis offset of the netclass CEmpTank
//Found By Theowningone
0	"NF Jeep"
1	"NF APC"
2	"NF Light Tank"
3	"NF Med Tank"
4	"NF Heavy Tank"
5	"NF Arty Tank"
6	"BE Jeep"
7	"BE APC"
8	"BE AFV"
9	"BE Med Tank"
10	"BE Heavy Tank"
11	"BE Arty Tank"
12	"BE Commander"
13	"NF Commander"

Vehicle Weapons

//These values are returned by the m_iWeapon offset of the netclass CEmpTankTurret
//Found By Theowningone
0	"Standard Machine Gun"
1	"Bio Machine Gun"     
2	".50 Cal Medium MG"   
3	".50 Cal Heavy MG"    
4	"Depleted Uranium MG" 
5	"Depleted Uranium HMG"
6	"Chain Gun"   
7	"Medium Chain Gun"    
8	"Plasma Machine Gun"  
9	"High Explosive MG"   
10	"Standard Cannon"     
11	"Ranged Cannon"
12	"High Explosive Cannon"
13	"Plasma Cannon"
14	"Rail Gun"    
15	"Small Artillery Cannon"      
16	"Medium Artillery Cannon"     
17	"High Explosive Artillery"    
18	"Ranged Artillery Cannon"     
19	"Standard ML" 
20	"Upgraded ML" 
21	"Biological Warhead"  
22	"HIT Missile" 
23	"Salvo Missile Launcher"      
24	"Guided Missile Launcher"     
25	"Upgraded Guided ML"  
26	"Homing Missile Launcher"     
27	"Upgraded Homing ML"  
28	"Salvo Homing ML"     
29	"Grenade Launcher"    
30	"Upgraded Grenade Launcher"   
31	"Small Bomb Bay"      
32	"Large Bomb Bay"

Research

//These values are returned by the Multiple Offsets of the netclass CResearchResource
//Found By Theowningone
0		"None"
1		"Physics"
2			"Superheated Material Physics"
3				"Plasma Cannon Projectile"
4				"Plasma Bullet Projectile"
5			"Projectile Physics"
6				"Reflective Armor"
7				"Extended Range Cannon"
8				"Heavy Caliber Machine Gun"
9			"Nuclear Fission"
10				"Fission Reactor"
11				"HIT Warhead"
12		"Chemistry"
13			"Improved Flagration Compounds"
14				"Explosive Tipped Bullets"
15			"Improved Detonation Compounds"
16				"Upgraded Grenades"
17				"Explosive Shells"
18			"Improved Warhead Compounds"
19				"Upgraded Missile Warhead"
20			"Improved Heat Transfer Fluids"
21				"Advanced Coolant Engine"
22			"Absorbant Armor"
23		"Mechanical Engineering"
24			"Upgraded Chassis"
25				"Medium Tank Chassis"
26				"Artillery Tank Chassis"
27				"Advanced Chassis"
28					"Heavy Tank Chassis"
29			"Advanced Machining"
30				"Composite Armor"
31				"Gas Turbine Engine"
32		"Electrical Engineering"
33			"Advanced Magnet Research"
34				"Rail Gun"
35				"3 Phase Electric Motor"
36			"Reactive Armor"
37			"Tracking Systems"
38				"Homing Missiles"
39				"Guided Missiles"
40				"Upgraded Turrets Lvl 2"
41					"Upgraded Turrets Lvl 3"
42		"Biology"
43			"Regenerative Armor"
44			"Bio Diesel Engine"
45			"Biological Weaponry"
46				"Biological Warhead"
47				"Biological Projectile"

Vehicle Armor

//These values are found in Multiple Offsets of the netclass CEmpTank
//Found By Theowningone
offset+0	"Front"
offset+4	"Back"
offset+8	"Left"
offset+12	"Right"

Player Classes

//These values are found in m_iEmpClass of the netclass CSDKPlayer
//Found By Theowningone
0	"Scout"
1	"Rifleman"
2	"Grenadier"
3	"Engineer"
4	"Unknown(Never Appears)"
5	"None/Spectator"

Squads

//These values are found in m_iSquad of the netclass CPlayerResource
//Found By Theowningone
0	"None"
1	"Alpha"
2	"Bravo"
3	"Charlie"
4	"Delta"
5	"Echo"
6	"Foxtrot"
7	"Golf"
8	"Hotel"
9	"India"
10	"Juliet"
11	"Kilo"
12	"Lima"
13	"Mike"
14	"November"
15	"Oscar"
16	"Papa"
17	"Quebec"
18	"Romeo"
19	"Sierra"
20	"Tango"
21	"Uniform"
22	"Victor"
23	"Whiskey"
24	"X-Ray"
25	"Yankee"
26	"Zulu"

Teams

0	Unassigned
1	Spectator
2	Northern Faction
3	Brenodi Empire

Virtual Offsets

Virtual Offsets v2.25 @ theowningone.info

GameData

Found by Recon and Theowningone. To use, put in gamedata folder.
core.games.txt @ theowningone.info
sdktools.games.ep2.txt @ theowningone.info

Dump files

Datamaps

Datamaps v2.25 @ theowningone.info


Netprops

NetProps v2.25 @ theowningone.info

Tools

Offsite links only please!

Theowningone's Empires API

A very useful set of functions to simplify the creation of sourcemod plugins for empires. It can be download from theowningone.info.