New Mods for NS2 Engine?
yimmasabi
Join Date: 2006-11-03 Member: 58318Members
<div class="IPBDescription">Do we ABLE to develop our own tactical game ?</div>Hmmm,
If NS Engine is much more public, may be we can develop another tactical NS game parallel to this or a story game of NS.
E.g. Snakes vs Bugs game including commanders, different alien models etc. ?
Or Aliens vs Predators game bla bla....
I tought that u are also thinking this property. Huh?
If NS Engine is much more public, may be we can develop another tactical NS game parallel to this or a story game of NS.
E.g. Snakes vs Bugs game including commanders, different alien models etc. ?
Or Aliens vs Predators game bla bla....
I tought that u are also thinking this property. Huh?
Comments
Snakes vs bugs though?
I guess whatever floats your boat <img src="style_emoticons/<#EMO_DIR#>/smile-fix.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile-fix.gif" />
There's some sample LUA code for the armory <a href="http://www.unknownworlds.com/ns2/news/2007/02/prosumers_and_natural_selection_2" target="_blank">in this old blog post</a>. Not sure if that helps.
It is difficult to give an example of what a class or ability script might look like. This is because Lua (Not LUA, it is a word not an abbreviation) is a language, and not an end-all solution. Developers who use Lua have to define their own callbacks, functions, and classes for interacting with the game engine. We can't write an example, without knowing the functions, callbacks, and classes used for hooking into the engine functions.
In that blog post, for example, they are showing parts of code ranging from precaching the armory's model.
Engine, which is essentially a Class, is their method of calling Engine specific components of the game engine.
OnMapPostLoad(), is a call back, which is used to trigger functions. So whatever is placed within that function, is called when the loading of the map has finished.
--
If you're still unsure, I can explain further. I develop in Lua for a few games. Lua is a simple language to work in, but has some ambiguity due to the different ways it can be embedded/implemented. Some implementations, instead of just defining the callback within the script, use a function to connect to the callback.
Multi Theft Auto, for example, uses their system of 'Event Handlers'.
By the way, long time lurker... first time poster.
I would guess that the script would list certain properties (such as 'kMGcost' and 'kShotguncost') and define their attributes.
Basically I'm wondering how easy it would be to alter the properties (assuming you have the models, textures, animations and sounds already).
For example, this is a nice and light weapon script with no heavy code, the sort of thing I am capable of editing without any sort of programming expertise.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->WeaponData
{
// Weapon data is loaded by both the Game and Client DLLs.
"printname" "MP500 SMG"
"viewmodel" "models/weapons/mp500/v_mp500.mdl"
"playermodel" "models/weapons/mp500/w_mp500.mdl"
"anim_prefix" "smg2"
"bucket" "2"
"bucket_position" "1"
"clip_size" "30"
"default_clip" "60"
"weight" "4"
"item_flags" "0"
"damage" "23"
"firerate" "0.1"
"refire_delay" "0.15"
"dmg_const" "1"
"dmg_linear" "0.0"
"dmg_quad" "0.000001"
"cof_modifier_crouched" "-0.5"
"cof_modifier_walking" "1"
"cof_modifier_running" "2"
"cof_modifier_sprinting" "4"
"cof_modifier_jumping" "6"
"player_speed_modifier_firing" "0.8"
"time_to_penalty_cap" "3"
"idle_time_before_penalty_decay" "0"
"min_time_before_penalty_decay" "0.4"
// V system
"v_horizontal_cap" "6"
"v_vertical_cap" "2"
"vramp5" "0.05"
"vramp10" "0.05"
"vramp20" "0.10"
"vramp30" "0.20"
"vramp50" "0.40"
// Cone of fire
"min_cof_angle" "1.75" // in degrees
"max_cof_angle" "8" // in degrees
"cof5" "0.05"
"cof10" "0.05"
"cof15" "0.05"
"cof16" "0.15"
"cof30" "0.45" // When our current penalty reach 25% of cof_penalty_cap, we want to be at 10% toward max COF
"cof50" "0.90" // When our current penalty reach 50% of cof_penalty_cap, we want to be at 50% toward max COF
// Recoil
"recoil_increment" "0.10"
"recoil_cap" "1.5"
// view kick
"shake_power" "0.7"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData
{
"empty" "Weapon_MP500.Empty"
"single_shot" "Weapon_MP500.Single"
"reload" "Weapon_MP500.Reload"
"special1" "Weapon_SMG1.Special1"
"special2" "Weapon_SMG1.Special2"
"double_shot" "Weapon_SMG1.Double"
"burst" "Weapon_SMG1.Burst"
}
// Weapon Sprite data is loaded by the Client DLL.
TextureData
{
"weapon"
{
"font" "WeaponIcons"
"character" "a"
}
"weapon_s"
{
"font" "WeaponIconsSelected"
"character" "a"
}
"ammo"
{
"font" "WeaponIcons"
"character" "r"
}
"ammo2"
{
"font" "WeaponIcons"
"character" "t"
}
"crosshair"
{
"font" "Crosshairs"
"character" "Q"
}
"autoaim"
{
"file" "sprites/crosshairs"
"x" "0"
"y" "48"
"width" "24"
"height" "24"
}
}
}<!--c2--></div><!--ec2-->
I'm wondering if it will be this easy to customise existing elements in Lua, or if there is more programming knowledge required.
I would guess that the script would list certain properties (such as 'kMGcost' and 'kShotguncost') and define their attributes.
Basically I'm wondering how easy it would be to alter the properties (assuming you have the models, textures, animations and sounds already).
For example, this is a nice and light weapon script with no heavy code, the sort of thing I am capable of editing without any sort of programming expertise.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->WeaponData
{
// Weapon data is loaded by both the Game and Client DLLs.
"printname" "MP500 SMG"
"viewmodel" "models/weapons/mp500/v_mp500.mdl"
"playermodel" "models/weapons/mp500/w_mp500.mdl"
"anim_prefix" "smg2"
"bucket" "2"
"bucket_position" "1"
"clip_size" "30"
"default_clip" "60"
"weight" "4"
"item_flags" "0"
"damage" "23"
"firerate" "0.1"
"refire_delay" "0.15"
"dmg_const" "1"
"dmg_linear" "0.0"
"dmg_quad" "0.000001"
"cof_modifier_crouched" "-0.5"
"cof_modifier_walking" "1"
"cof_modifier_running" "2"
"cof_modifier_sprinting" "4"
"cof_modifier_jumping" "6"
"player_speed_modifier_firing" "0.8"
"time_to_penalty_cap" "3"
"idle_time_before_penalty_decay" "0"
"min_time_before_penalty_decay" "0.4"
// V system
"v_horizontal_cap" "6"
"v_vertical_cap" "2"
"vramp5" "0.05"
"vramp10" "0.05"
"vramp20" "0.10"
"vramp30" "0.20"
"vramp50" "0.40"
// Cone of fire
"min_cof_angle" "1.75" // in degrees
"max_cof_angle" "8" // in degrees
"cof5" "0.05"
"cof10" "0.05"
"cof15" "0.05"
"cof16" "0.15"
"cof30" "0.45" // When our current penalty reach 25% of cof_penalty_cap, we want to be at 10% toward max COF
"cof50" "0.90" // When our current penalty reach 50% of cof_penalty_cap, we want to be at 50% toward max COF
// Recoil
"recoil_increment" "0.10"
"recoil_cap" "1.5"
// view kick
"shake_power" "0.7"
// Sounds for the weapon. There is a max of 16 sounds per category (i.e. max 16 "single_shot" sounds)
SoundData
{
"empty" "Weapon_MP500.Empty"
"single_shot" "Weapon_MP500.Single"
"reload" "Weapon_MP500.Reload"
"special1" "Weapon_SMG1.Special1"
"special2" "Weapon_SMG1.Special2"
"double_shot" "Weapon_SMG1.Double"
"burst" "Weapon_SMG1.Burst"
}
// Weapon Sprite data is loaded by the Client DLL.
TextureData
{
"weapon"
{
"font" "WeaponIcons"
"character" "a"
}
"weapon_s"
{
"font" "WeaponIconsSelected"
"character" "a"
}
"ammo"
{
"font" "WeaponIcons"
"character" "r"
}
"ammo2"
{
"font" "WeaponIcons"
"character" "t"
}
"crosshair"
{
"font" "Crosshairs"
"character" "Q"
}
"autoaim"
{
"file" "sprites/crosshairs"
"x" "0"
"y" "48"
"width" "24"
"height" "24"
}
}
}<!--c2--></div><!--ec2-->
I'm wondering if it will be this easy to customise existing elements in Lua, or if there is more programming knowledge required.<!--QuoteEnd--></div><!--QuoteEEnd-->
From my understanding, it is harder to code the game in LUA for the developers. The trade off is balance changes and things of that nature can be changed on the fly for playtests/official patches. I don't believe the developers have to release multiple builds when just testing balance and manipulating the already in game code.
This time investment will save an enormous amount of hours with regards to PTs looking at balance and other features, things can be coded on the fly and implemented immediately.
Also, Crispy, I don't see the point, except possibly under separation of systems, to have a separate format for defining weapons or entities. This can all be done in Lua, if the engine is developed to have those hooks. Additionally, if it is all contained in Lua, this allows for servers to easily modify weapons and their properties. Even add custom ones.
You answer seems to hint that this is down to how UWE want to program their game, so Lua doesn't really feature in this decision, it's more of a personal preference.
You answer seems to hint that this is down to how UWE want to program their game, so Lua doesn't really feature in this decision, it's more of a personal preference.<!--QuoteEnd--></div><!--QuoteEEnd-->
Exactly. Lua is a language that is meant to be implemented many different ways. I just brought up that, in my view, having entities defined within Lua would allow for more direct access for modification on the server. This will allow less hacking to make a modification. Though, if they decide to store weapons and such in a format such as that, they could use a meta file or linkage system so that servers could supply files for use in a similar fashion to client-side lua overrides.