PDA

View Full Version : Complete list of weapon attributes [WIP/long]



theBlind
15th Sep 04, 6:08 AM
I went through a few weapon files and collected all the attributes I could find. I did some research and noted the stuff I found out (if its not obvious from the name already) behind the entry.
Please feel free to post your own findings and correct any mistakes I have made.

Hopefully, this will become a handy reference for weapon attributes. If someone would love to create a similar document for squads or units, that would be great. *hinthint*
If not, I´ll do it sometime soon.

EDIT: Here (http://forums.relicnews.com/showthread.php?t=37874) is the same tread for entity attributes



GameData["accuracy"] = 0.000 <-- base accuracy

GameData["accuracy_reduction_when_moving"] = 0.000 <-- presumably used together with ["damage_reduction_when_moving"] to disallow heavy weapons to shoot while moving. Then ["setup_time"] is used as well
GameData["area_effect"]["weapon_damage"]["armour_damage"]["damage_reduction_when_moving"] = 1.000

GameData["area_effect"] = Reference("area_effect_table") <-- this is for area of effect weapons like flamers, the FCs hammer etc.
GameData["area_effect"]["area_effect_information"]["angle_left"] = -10.000 <-- given the "pie-shape" effect further down, this is the left end of the pie relative to zero in front of the unit (guessing)
GameData["area_effect"]["area_effect_information"]["angle_right"] = 10.000
GameData["area_effect"]["area_effect_information"]["area_type_name"] = "area_pie" <-- someone remember the different area_effects possible? One of the devs stated them in an interview not so long ago. pie, circle, triangle?
GameData["area_effect"]["area_effect_information"]["radius"] = 10.000 <-- from the units "base" to the end of area?

GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing"] = 1.000 <-- seems not to have any effect. More info on armour here (http://forums.relicnews.com/showthread.php?t=36361
)
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_01"]["armour_type"] = Reference("tp_infantry_low") <-- different armor classes
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_02"]["armour_type"] = Reference("tp_infantry_med")
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_03"]["armour_type"] = Reference("tp_infantry_high")
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_04"]["armour_type"] = Reference("tp_infantry_heavy_med")
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_05"]["armour_type"] = Reference("tp_infantry_heavy_high")
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_06"]["armour_type"] = Reference("tp_vehicle_low")
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_07"]["armour_type"] = Reference("tp_vehicle_med")
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_08"]["armour_type"] = Reference("tp_vehicle_high")
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_09"]["armour_type"] = Reference("tp_infantry_med")
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_10"]["armour_type"] = Reference("tp_monster_high")
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_11"]["armour_type"] = Reference("tp_commander")
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_12"]["armour_type"] = Reference("tp_building_low")
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_13"]["armour_type"] = Reference("tp_building_med")
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_14"]["armour_type"] = Reference("tp_building_high")
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_01"]["armour_type"] = Reference("tp_infantry_heavy_med") <-- different reference in space_marine_flamer; next inheritance level, space_marine_flamer_scout has same reference as space_marine_shooting_weapons, presumably overwriting. ERROR? OLD DATA?
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_02"]["armour_type"] = Reference("tp_infantry_heavy_high") <-- same for entries 02-05 in space_marine_flamer
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_01"]["armour_piercing_value"] = 47.250 <-- is it by chance that the references 01-05 made wrong in the higher instance are re-referenced here while others are not?
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_01"]["armour_type"] = Reference("tp_infantry_low")

GameData["area_effect"]["weapon_damage"]["armour_damage"]["max_damage"] = 4.400 <--maximum damage the weapon deals, see below
GameData["area_effect"]["weapon_damage"]["armour_damage"]["min_damage"] = 3.600 <--min damage, those two are modified by armor
GameData["area_effect"]["weapon_damage"]["armour_damage"]["min_damage_value"] = 0.000 <-- absolute min damage, regardless of any other factors
GameData["area_effect"]["weapon_damage"]["armour_damage"]["morale_damage"] = 25.000

GameData["area_effect"]["weapon_damage"]["hit_events"]["tp_flesh"] = "data:art/events/Unit_Impact_events\\Blood_Splatter_Impact_S.events" <-- note the way complete diretories are referenced. Gotta be useful sometimes.
GameData["area_effect"]["weapon_damage"]["hit_events"]["tp_heavy_metal_armour"] = "data:art/events/Impact_Bolter_Metal_S.events"
GameData["area_effect"]["weapon_damage"]["hit_events"]["tp_light_metal_armour"] = "data:art/events/Impact_Bolter_Metal_S.events"
GameData["area_effect"]["weapon_damage"]["hit_events"]["tp_stone"] = "data:art/events/Impact_Bolter_Metal_S.events"

GameData["area_effect"]["weapon_damage"]["modifiers"]["modifier_01"]["max_lifetime"] = 8.000 <-- those entries seem to create the after-burn effects caused by flamers.
GameData["area_effect"]["weapon_damage"]["modifiers"]["modifier_01"]["modifier"] = Reference("health_degeneration_modifier") <-- health_degeneration_modifier can be found in Data\attrib\modifiers\ but does nothing else than inherite modifiers which should not do anythign expect multipy some value with 1 repeatetly
GameData["area_effect"]["weapon_damage"]["modifiers"]["modifier_01"]["modifier"]["application_type"] = "apply_to_entity" <-- target type? What others are there? Has also been seen as self reference, I think.
GameData["area_effect"]["weapon_damage"]["modifiers"]["modifier_01"]["modifier"]["exclusive"] = true <-- same effect only once? only this very effect?
GameData["area_effect"]["weapon_damage"]["modifiers"]["modifier_01"]["modifier"]["usage_type"] = "addition"
GameData["area_effect"]["weapon_damage"]["modifiers"]["modifier_02"]["max_lifetime"] = 1.000
GameData["area_effect"]["weapon_damage"]["modifiers"]["modifier_02"]["modifier"] = Reference("flamer_hit_event") <-- same as health_degeneration_modifier, does noting noticable as well.

GameData["attack_priorities"] = Reference("type_armour_table")
GameData["squad_combat_stance_ext"]["attack_priorities"]["priority_01"] = Reference("tp_infantry_high") <-- those are the only attack_priorites lists that I could find. These are in the squad entries and it´s not sure if a weapon uses them at all.
GameData["squad_combat_stance_ext"]["attack_priorities"]["priority_02"] = Reference("tp_infantry_med")
GameData["squad_combat_stance_ext"]["attack_priorities"]["priority_03"] = Reference("tp_infantry_low")
GameData["squad_combat_stance_ext"]["attack_priorities"]["priority_04"] = Reference("tp_infantry_heavy_high")
GameData["squad_combat_stance_ext"]["attack_priorities"]["priority_05"] = Reference("tp_infantry_heavy_med")
GameData["squad_combat_stance_ext"]["attack_priorities"]["priority_06"] = Reference("tp_commander")
GameData["squad_combat_stance_ext"]["attack_priorities"]["priority_07"] = Reference("tp_monster_high")
GameData["squad_combat_stance_ext"]["attack_priorities"]["priority_08"] = Reference("tp_monster_med")
GameData["squad_combat_stance_ext"]["attack_priorities"]["priority_09"] = Reference("tp_vehicle_low")
GameData["squad_combat_stance_ext"]["attack_priorities"]["priority_10"] = Reference("tp_vehicle_med")
GameData["squad_combat_stance_ext"]["attack_priorities"]["priority_11"] = Reference("tp_vehicle_high")


GameData["cost"] = Reference("time_cost_table")
GameData["cost"]["cost"]["power"] = 10.000
GameData["cost"]["cost"]["requisition"] = 40.000
GameData["cost"]["time_seconds"] = 11.000

GameData["death_motion_value"] = "" <-- ???

GameData["flamer_table"] = Reference("flamer_table") <-- does this do anything? flamer_table inherits table which is empty...
GameData["flamer_table"]["burn_delay"] = 0.500
GameData["fire_cone_angle"] = 5.000

GameData["fired_projectile"] = "" <-- visible projectiles like missiles. Seem to take several files that describe model and effects.

GameData["horizontal_traverse_speed"] = 180.000 <-- speed of the shot
GameData["vertical_traverse_speed"] = 20.000

GameData["linger_on_target_after_fire_time"] = 0.000 <-- time the weapon stays pointed at the target after shooting?

GameData["max_range"] = 18.000
GameData["min_range"] = 0.000

GameData["max_traverse_down"] = 0.000 <-- angle the weapon can track. Seems to be 0-180°
GameData["max_traverse_left"] = 0.000
GameData["max_traverse_right"] = 0.000
GameData["max_traverse_up"] = 0.000

GameData["melee_weapon"] = false

GameData["miss_events"] = Reference("terrain_footfall_based_event_table")
GameData["miss_events"]["dirtsand"] = "Data:Art/Events/Ground_impact/Bolter_Medium_Miss_Dirtsand.events"
GameData["miss_events"]["grass"] = "Data:Art/Events/Ground_impact/Bolter_Medium_Miss_Grass.events"
GameData["miss_events"]["rock"] = "Data:Art/Events/Ground_impact/Bolter_Medium_Miss_Rock.events"
GameData["miss_events"]["water"] = "Data:Art/Events/Ground_impact/Bolter_Medium_Miss_Water.events"

GameData["move_aim_to_home"] = true <-- shoot before achieving target lock. Looks cool for fast-cycling weapons
GameData["move_to_home_position_delay"] = 1.500

GameData["obey_terrain_line_of_sight"] = true <-- this makes units NOT shoot through terrain. Pretty neat feature, I must say, although I can only guess at the horrendous ammounts of CPU time this will take in an all out fight. Nice to have anyway

GameData["random_aim_on_create"] = false <-- ???

GameData["reload_time"] = 0.000 <-- time between shots. Is there a HW2 like burst? Hope not...

GameData["requirements"] = Reference("requirement_table")
GameData["requirements"]["required_1"] = Reference("required_structure")
GameData["requirements"]["required_1"]["structure_name"] = "space_marine_armoury"

GameData["requirements"]["required_1"] = Reference("required_structure") <-- see Data\attrib\requirements for more. has anyone got squads as requirements to work?
GameData["requirements"]["required_1"]["structure_name"] = "space_marine_armoury"

GameData["setup_time"] = 0.000 <-- time to get ready to fire after moving

GameData["stationary_horizontal_multiplier"] = 1.000 <-- ???


GameData["ui_effective_against"] = Reference("text_table") <-- those UI entries reference to some central text file for localisation purposes, I guess
GameData["ui_hotkey_name"] = ""
GameData["ui_info"] = Reference("ui_info_table")
GameData["ui_info"]["icon_name"] = "space_marine_icons/upgrade"
GameData["ui_effective_against"]["text_01"] = "$37954"
GameData["ui_effective_against"]["text_02"] = "$37958"
GameData["ui_hotkey_name"] = "marine_flamer"
GameData["ui_info"]["help_text_id"] = "$98031"
GameData["ui_info"]["help_text_list"]["text_01"] = "$98800"
GameData["ui_info"]["help_text_list"]["text_02"] = "$98031"
GameData["ui_info"]["help_text_list"]["text_03"] = "$98032"
GameData["ui_info"]["help_text_list"]["text_04"] = "$98033"
GameData["ui_info"]["icon_name"] = "space_marine_icons/upgrade_flamer"
GameData["ui_info"]["screen_name_id"] = "$98030"

GameData["weapon_spawned_event_name"] = "" <-- ???


EDIT: ugg. Is there any way I can format that code window?
EDIT2: put in area of effect descriptions
EDIT3: changed the obey LOS parameter to true to get the described effect. My bad.

Lord Dante
15th Sep 04, 6:55 AM
some sort of wordwrap is required...

good stuff eitherway!

the not shoot through terrain bit is cool - good news for all those Space hulk mode ideas! :)

TheBladeRoden
15th Sep 04, 10:24 AM
bookmarked!

Fang
15th Sep 04, 10:27 AM
That is some good compliling, I think some people should get together and start up a wiki. I think SvK and some others were trying to figure out the armour values and how they worked. So if we could start compliling all this information before the game comes out wed have a good head start on modding.

Also, I have a question you seem to have done some testing, have you managed to make a new weapon that uses an existing model for a squad, that does a different effect. Cause im trying to make a 2nd version of the rocket launcher that does more light armor dmg and has a blast radius for anti light infantry, yet when i transfered some of the values from the ork battlecannon to get the blast effect, it crashed the game and didnt really tell me in the warning log what happened.

theBlind
15th Sep 04, 11:57 AM
Hmm, so far I have not yet tuched weapon alterations that much. I had no luck in giving a squad another squads weapons. Also now that you remind me, the area of effect stuff is still missing from my list. Gotta check into that.

Fang
15th Sep 04, 1:33 PM
I can pretty much confirm that giving a squad a weapon that uses a model they cannot already have does not work as they dont have animations for it. However I hope to fiddle with making alterations to existing weapons.


Below is how I have modified the rocket launcher. I made a copy and renamed it then added the lines between added and end of added, and I also copied the rocket launcher entry in the base space marine entry in ebps folder and made it weapon 6. the game runs fine up until i build and select the chaple barracks to build a squad. Anyone have a clue why this is?

Im now fairly certain that it may have somthing to do with the entry in the marine ebps file, or having more than 5 weapons or somthing along those lines...

------below is weapon chart--------

GameData["accuracy"] = 0.850
GameData["accuracy_reduction_when_moving"] = 1.000

-----------added---------------------

GameData["area_effect"]["area_effect_information"]["area_effect_events"]["dirtsand"] = "data:Art/Events/ground_impact/Impact_Artillery_L_Dirt.events"
GameData["area_effect"]["area_effect_information"]["area_effect_events"]["grass"] = "data:Art/Events/ground_impact/Impact_Artillery_L_dirt.events"
GameData["area_effect"]["area_effect_information"]["area_effect_events"]["rock"] = "data:Art/Events/ground_impact/Impact_Artillery_L_All.events"
GameData["area_effect"]["area_effect_information"]["area_effect_events"]["water"] = "ground_impact/artillery_impact_water"
GameData["area_effect"]["area_effect_information"]["area_type_name"] = "area_circle"
GameData["area_effect"]["area_effect_information"]["filter_type"] = "all"
GameData["area_effect"]["area_effect_information"]["radius"] = 2.000
GameData["area_effect"]["throw_data"]["direction_angle_random"] = 15.000
GameData["area_effect"]["throw_data"]["force_max"] = 40.000
GameData["area_effect"]["throw_data"]["force_min"] = 20.000
GameData["area_effect"]["throw_data"]["up_angle_max"] = 50.000
GameData["area_effect"]["throw_data"]["up_angle_min"] = 45.000
GameData["miss_events"]["dirtsand"] = "data:Art/Events/ground_impact/Impact_Artillery_L_Dirt.events"
GameData["miss_events"]["grass"] = "data:Art/Events/ground_impact/Impact_Artillery_L_dirt.events"
GameData["miss_events"]["rock"] = "data:Art/Events/ground_impact/Impact_Artillery_L_All.events"
GameData["miss_events"]["water"] = "ground_impact/artillery_impact_water"
GameData["area_effect"]["weapon_damage"]["hit_events"]["tp_flesh"] = "data:art/events/unit_impact_events/Unit_Thrown_Smoke_Spray.events"
GameData["area_effect"]["weapon_damage"]["hit_events"]["tp_heavy_metal_armour"] = ""
GameData["area_effect"]["weapon_damage"]["hit_events"]["tp_light_metal_armour"] = "data:art/events/unit_impact_events/Unit_Thrown_Smoke_Spray.events"
GameData["area_effect"]["weapon_damage"]["hit_events"]["tp_stone"] = ""

---------------------end of added---------------------

GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_01"]["armour_piercing_value"] = 38.400
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_02"]["armour_piercing_value"] = 37.714
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_03"]["armour_piercing_value"] = 13.714
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_04"]["armour_piercing_value"] = 48.000
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_05"]["armour_piercing_value"] = 17.000
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_06"]["armour_piercing_value"] = 21.000
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_07"]["armour_piercing_value"] = 5.000
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_08"]["armour_piercing_value"] = 2.000
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_09"]["armour_piercing_value"] = 5.000
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_10"]["armour_piercing_value"] = 12.000
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_11"]["armour_piercing_value"] = 2.000
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_12"]["armour_piercing_value"] = 4.800
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_12"]["armour_type"] = Reference("tp_infantry_low")
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_13"]["armour_piercing_value"] = 4.444
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_13"]["armour_type"] = Reference("tp_infantry_med")
GameData["area_effect"]["weapon_damage"]["armour_damage"]["armour_piercing_types"]["entry_14"]["armour_type"] = Reference("tp_infantry_high")
GameData["area_effect"]["weapon_damage"]["armour_damage"]["damage_reduction_when_moving"] = 1.000
GameData["area_effect"]["weapon_damage"]["armour_damage"]["max_damage"] = 120.000
GameData["area_effect"]["weapon_damage"]["armour_damage"]["min_damage"] = 105.000
GameData["area_effect"]["weapon_damage"]["armour_damage"]["morale_damage"] = 75.000
GameData["cost"]["cost"]["power"] = 15.000
GameData["cost"]["cost"]["requisition"] = 65.000
GameData["cost"]["time_seconds"] = 10.000
GameData["setup_time"] = 2.500
GameData["stationary_horizontal_multiplier"] = 0.100
GameData["vertical_traverse_speed"] = 20.000

theBlind
15th Sep 04, 2:46 PM
Now I know you won´t like this - but it works for me.

I removed the requirements for testing purposes and then equipped my starting squad of tactical marines with 2 of them in game.

They are quiet effective against orks, explode with AOE and also leave those nice ork_battlecannon craters, although only one per salvo.

Here´s my changes to space_marine_missile_launcher_tactical.lua

GameData["area_effect"]["weapon_damage"]["hit_events"]["tp_flesh"] = "Projectile_FX/Krak_Missile_Impact"
GameData["area_effect"]["weapon_damage"]["hit_events"]["tp_heavy_metal_armour"] = "Projectile_FX/Krak_Missile_Impact_hvy"
GameData["area_effect"]["weapon_damage"]["hit_events"]["tp_light_metal_armour"] = "Projectile_FX/Krak_Missile_Impact"
GameData["area_effect"]["weapon_damage"]["hit_events"]["tp_stone"] = "Projectile_FX/Krak_Missile_Impact"

those I used to replace your hit events, which were not listening events for all target types. That is what did make it not work, imo

Fang
15th Sep 04, 2:57 PM
Actually I think Ive encounter a hidden possibly hardcoded effect to this game. See what I wanted was that as an addition upgrade so youd have two rocket launcher choices. Numerous trys at this crashed the game. So I simply made an exact copy of the rocket launcher and tried, the game crashed yet again. So I tested somthing, I simply altered the existing rocket entry with my own. It worked after that. So nothing is wrong with the weapon itself. Somthing is either wrong with my input into the spacemarine ebps file for individual space marine troopers, or (I hope this is wrong) you can only have 4 weapon upgrades per guy?

*also did you modify your existing tactical squad rocket launcher or make a new weapon and add it to the marine? (this is critical info)^^

theBlind
15th Sep 04, 3:34 PM
Ok, now that I understand what you want to do, I also think you hit a hardcode wall. Below is the snippet I added to the SM_tactical blueprint. If I index this as weapon_05 it will replace the std. launcher and work but as soon as I start asdressing it as weapons_06 it crashes.

GameData["combat_ext"]["hardpoints"]["hardpoint_01"]["weapon_table"]["weapon_06"]["muzzle"]["x"] = 0.400
GameData["combat_ext"]["hardpoints"]["hardpoint_01"]["weapon_table"]["weapon_06"]["muzzle"]["y"] = 2.100
GameData["combat_ext"]["hardpoints"]["hardpoint_01"]["weapon_table"]["weapon_06"]["muzzle"]["z"] = 0.940
GameData["combat_ext"]["hardpoints"]["hardpoint_01"]["weapon_table"]["weapon_06"]["name_for_this_weapon_choice"] = "space_marines_missile_launcher_frag"
GameData["combat_ext"]["hardpoints"]["hardpoint_01"]["weapon_table"]["weapon_06"]["origin"]["x"] = 0.400
GameData["combat_ext"]["hardpoints"]["hardpoint_01"]["weapon_table"]["weapon_06"]["origin"]["y"] = 2.100
GameData["combat_ext"]["hardpoints"]["hardpoint_01"]["weapon_table"]["weapon_06"]["weapon"] = "space_marine_missile_launcher_tactical_frag"

Fang
15th Sep 04, 3:48 PM
Aha, so then you can only have 4 max available upgrade weapons per squad... So in order to do this Id have to make a second squad... Thats interesting, yet not so cool. Unless... it works in hardpoint 2, if its 6 weapons per hardpoint then thats a total of 12 possible, so could try hardpoint two... but I doubt it would work since that would replace the knife and prolly not animate well. Hmm, the only other workaround to this would be to make it so you could attach a rocket trooper to the squad somehow.

theBlind
15th Sep 04, 4:03 PM
Maybe have it a research option (don´t ask, I have no idea how to make complex upgrades, thats what I 'think' this is) to change them globally. Not that nice, either.

Also that means that I can most propably kiss my ideas for lascannons and plasma cannons goodbye. :cry:

mecha
15th Sep 04, 4:25 PM
You need to change the base table to have more than 5 entries

Data\Attrib\Tables\weapon_table.lua

Fang
15th Sep 04, 4:39 PM
Oh cool, Thanks for the info mecha :bandit: :beer: :bow:

theBlind
15th Sep 04, 6:26 PM
Hmm, no luck here. If i leave the weapon_table as is, it will display the first 5 entries (w/o the default one). If I put more lines in weapon_table, it won´t display the 6th entry either. I tried with the frag launcher as well as the plasma gun as weapon_06. Both did not display but will display if in range of 02-05.

mecha
15th Sep 04, 9:55 PM
Prolly a UI thing then, try modding that :)

theBlind
16th Sep 04, 12:21 AM
"Mod da UI, foo!" :)

Well, easy for you to say. You can just walk over to the other room and ask someone who knows. :Slap:
If I walk over to the other room and ask how to mod the UI, my guys look at me this certain funny way that make me sure their are just incrementing my "Is insane, must get hospitalised" counter a fair bit. :D

SvK
16th Sep 04, 12:53 AM
The UI LUA file is 48kb of confusion for me. I had grand plans of changing the firepower numbers, but it's not going to be a snap like adding a new weapon type. DOW has spoiled me already.

theBlind
16th Sep 04, 3:50 AM
So, what do we know? I fouind this little snippet in taskbar.ui

list_weapon_upgrades =
{
"Upgrade01",
"Upgrade02",
"Upgrade03",
"Upgrade04",
}

and already thought I had it, but adding Upgrade05 there does not do anything.

Also, combat.ext lists only 5 weapons, so i added a 6th

GameData["hardpoints"]["hardpoint_01"]["weapon_table"]["weapon_06"]["muzzle"]["y"] = 1.000
GameData["hardpoints"]["hardpoint_01"]["weapon_table"]["weapon_06"]["origin"]["y"] = 1.000

but no joy either.
combat.ext references hardpoint_table which in turn references hardpoint_details and from there on weapon_table and finally weapon_details. In this whole tree I have added a 6th entry where appicable. Nothing.

My best guess is that I´m missing the "anchor" where the new list entry in tied into the UI. So while I may have a complete list and the weapon listed as well, its not displayed because the UI does not know its there.
I have no idea where this entry could be, exept that it might be in uistyles.styles compared to which taskbar.ui is a 3-liner.

meppa
16th Sep 04, 5:39 AM
If you look ingame ui you will notice that there is only room for 4 weapon upgrade buttons. So you need to deactivate some other button and put that Upgrade05 button in its place or figure some other way to put that button up.

There might be a way to make that missile launcher fire both missiles at once. You could set them to select targets with those missiles so that krack doesn't have area effect damage and hurts vehicles only and frag has area effect and hurts only infantry. I am not sure about this but it might work. Worth studying atleast.

Lord Dante
16th Sep 04, 5:43 AM
when a unit fires it has a prority list - if this was combined with the rocket launcher it could be used to determin what kind of shot is fired. Krack for tanks etc, frag for units.
Somthing like that.

meppa
16th Sep 04, 6:06 AM
I can pretty much confirm that giving a squad a weapon that uses a model they cannot already have does not work as they dont have animations for it. However I hope to fiddle with making alterations to existing weapons.


Actually you can give squads any weapons, and make them use any animations squads have. Projectiles as in solid slugs that have models are defined with weapons and tracers seem to come with weapon models that are attached propably inside trooper models.

For example:

GameData["combat_ext"]["hardpoints"]["hardpoint_01"]["weapon_table"]["weapon_01"]["name_for_this_weapon_choice"] = "cadinq_lasgun"

this line tells model to use weaponmodel and animation called cadinq_lasgun (it doesn't excist yet and is doing nothing at the moment, if models have only one animation they will use that no matter what you put in that line)

GameData["combat_ext"]["hardpoints"]["hardpoint_01"]["weapon_table"]["weapon_04"]["weapon"] = "cadinq_lascannon_guardsmen"

This on the other hand is telling the trooper to use a weapon script cadinq_lascannon_guardsmen from weapon folder.

So you can create already entirely new weapons and use old animations for them, or just make them totally invisible, you can make them use different projectiles and hit effects, but you can't make them look like rays yet.

theBlind
16th Sep 04, 6:18 AM
Actually you can give squads any weapons, and make them use any animations squads have. Projectiles as in solid slugs that have models are defined with weapons and tracers seem to come with weapon models that are attached propably inside trooper models.

So, wait a sec. I know I can give it something that shoots with the stats of another weapon. But do you imply that I can give it another modelled weapon as well? (eg. give scouts heavy bolters?)
Could you provide code for that, if you don´t mind?

I´m not sure if removing buttons will solve anything. If you look at units without reinforcements or leader upgrades but still with weapon upgrades (SM Predator for ex) you´ll notice that those weapon buttons are still inside the same 4 places.

@Lord Dante: I have seen the priority lists, but those are imho on a per squad base, not a per weapon base. (I could be remembering that point false, I´ll have to check) I have, iirc, not seen anything resembling the HW2 torpedo frigate "hack" with 0 acc against certain target types to make it shoot something else. The way I understand it, there can only be one weapon active per hardpoint at any one time. Those are then changed through upgrades and/or researches.

more to look up
-theBlind

meppa
16th Sep 04, 6:23 AM
Giving scouts heavy bolters is pretty simple, they will work fine and do damage etc.. Making them show on that model is a different story, that requires mod tools and editing of that scout model. And since those mod tools do not exist yet, you can't make it visible at the moment. So no modelled weapons until modellers can make them.

That line which tell what model parts and animations to use is tied to that particular trooper model, not generally to all models. Hope that clears things.

I mean that you should redefine that leader button place to work as upgrade5 button.

theBlind
16th Sep 04, 6:28 AM
Yesyes, we actually mean the same thing. But as to re-defining this button: where do you do that in the first place?

meppa
16th Sep 04, 6:32 AM
Start in that ui file, i just fear that if you manage to do that you can't have any leaders or attaching or whatever button you redefine anymore =)

Fang
16th Sep 04, 6:39 AM
@the blind, I dont know how to find the UI thingy for now, So what I did was make two kinds of space marine squads, Tactical and Devastator(like the TTgame) the tactical has less upgrades but starts with more guys, and can only take plasma gun, flamer, and heavy bolter.. the Devastators start with 4 and can have more weapon upgrades and have the two rocket launchers, plasma gun, and also the heavy bolter. aside from some balancing this seemed to work fairly well.

@meppa, I think you miss read my post, I know you can modify an existing itema squad can use to get a new effect from it. What you cant do (and what im saying, and you just reiterated) is that you cannot have a new model of a weapon used by a squad. ie. you cannot have a regular tactical squad equiped with bolt pistols and chainswords and have them show it. Also you basically said what I said. You cannot give a space marine squad lasguns, and have it show them using lasguns as a model in the game without some extensive modeling and editing. You could make bolters shoot like lasguns... but that defeats the purpose.

theBlind
16th Sep 04, 6:51 AM
Ahhh, the sweet taste of success!
http://www.theBlind.de/wh40k/dow/relic00003.jpg

meppa
16th Sep 04, 6:56 AM
Good job, care to post changed code bits? And what happends if you attach character to that unit?

theBlind
16th Sep 04, 7:54 AM
Sorry, I had to bathe in my 5 minutes of victory over this friggin problem I´ve been sitting on the last day. :D
Besides, I wanted to implement my secondary leader idea, but that won´t work for now. Later.

Anyway, what I did:

In taskbar.lua, there´s an entry like this:

list_weapon_upgrades =
{
"Upgrade01",
"Upgrade02",
"Upgrade03",
"Upgrade04",
}

Now, I completely mis-read that entry and thought that would create a list that was then somehow anchored into the UI. Wrong way. What it does is anchor the list entries into the UI right there.
See, the Squad control area part of the UI (where the weapon upgrades are located) is referenced by name. Those names are, from top left to bottom right:

Reinforce; AddLeader
Upgrade01; Upgrade02
Upgrade03; Upgrade04
Attach; Detach

named after the funktions that are normally placed there.

So, I added references to the Attach and Detach entries in list_weapon_upgrades to make it look like this:

list_weapon_upgrades =
{
"Upgrade01",
"Upgrade02",
"Upgrade03",
"Upgrade04",
"Attach",
"Detach",
}

Now, the 5th entry in the weapons list goes into the UI field called "Attach" and there we go. Simple :D

EDIT: Ah, the missing leader is just from trying your earlier suggestion and removing the leader. Once re-added it appears no problem.
Now, I have to test what happens when I attach the FC. I´d guess the buttons get overridden ala FarSeer attached to SeerCouncil in beta.

Double Post

Well, here´s more:

Attaching the FC is a bit of a problem. Its not the weapon button that gets overwritten but the attach/detach button. So no detaching (hotkay won´t work as well)
What I did was move attach/detach to list_commands[6] and (to make room for a second leader spot move reinforcements to list_command[5] (note no usage of " " )

Also, it seems the Detach field is reserved - I could not get anything to diplay there. So for now I assume it to be reserved for the leader picture.

Now, the problem is that all this stuff is global. So solving one problem by moving something causes others somewhere else. Maybe later on we can create new UI buttons and circumvent that, but for now we´re kinda stuck.

Does anyone know where those buttons are defined in the first place?

meppa
16th Sep 04, 7:59 AM
That last field isn't detach, attach becomes detach when something is attached, if i understood that file correctly by glancing it. You should try to use that attach/detach function to that icon slot that you thinked was detach field. That way you could have 5 upgrades and attach/detach functionality and only miss that icon what is attached.