Mod Studio Macro's - For All You Newbie Modders -1 reply

Please wait...

Sgt. D. Pilla

Uber Geek

50 XP

23rd October 2007

0 Uploads

3,473 Posts

0 Threads

#1 11 years ago

Alrighty Guys, as most modders would know, and have experianced, making hundreds of changes that are all the same to every team, can take along time, and get very frustrating, to the point where when you go to test, you notice you've missed some things, thus the duration of doing what is a relativly simple change, 100 times over, becomes rather arduous task.

So in Corsix's Mod Studio 0.5.4 the first Opposing Fronts compatable release of Mod Studio, he introduced Macro's to make these arduous tasks, that much faster and easier... Now they arn't easy to get a hang of, but once you do get a hang of them, they make modding so much easier.

During my just over a year of modding Company of Heroes (Since Release Date) I have learn't a lot of tips and tricks, and these Macro's are just one of them.

So what I have done for you modders, is released the Macro's that I've used extensivly with my Company of Heroes, and Opposing Fronts mods.

==========Remove Unit Occlusion

function each_file(rgd) rgd:SET("GameData","ui_ext","occlusion_state", nil) rgd:save() end

==========Reload Frequency

function each_file(rgd) rgd:SET("GameData","weapon_bag","reload","frequency","max", 10) rgd:SET("GameData","weapon_bag","reload","frequency","min", 8) rgd:save() end

==========Accuracy (weapons)

function each_file(rgd) rgd:SET("GameData","weapon_bag","accuracy","distant", 0.2) rgd:SET("GameData","weapon_bag","accuracy","long", 0.3) rgd:SET("GameData","weapon_bag","accuracy","medium", 0.4) rgd:SET("GameData","weapon_bag","accuracy","short", 0.5) rgd:save() end

==========Reinforce Price

function each_file(rgd) rgd:SET("GameData","squad_reinforce_ext","time_cost_percentage","cost_percentage", 1) rgd:SET("GameData","squad_reinforce_ext","time_cost_percentage","time_percentage", 1) rgd:save() end

==========Damage dealt

function each_file(rgd) rgd:SET("GameData","weapon_bag","damage","max", 5) rgd:SET("GameData","weapon_bag","damage","min", 5) rgd:save() end

==========Weapon range

function each_file(rgd) rgd:SET("GameData","weapon_bag","range","max", 42) rgd:SET("GameData","weapon_bag","range","min", 0) rgd:SET("GameData","weapon_bag","range","mid","distant", 42) rgd:SET("GameData","weapon_bag","range","mid","long", 35) rgd:SET("GameData","weapon_bag","range","mid","medium", 25) rgd:SET("GameData","weapon_bag","range","mid","short", 15) rgd:save() end

==========COVER MACRO

function each_file(rgd) rgd:SET("GameData","cover_ext","tp_heavy","safety_value", 6) rgd:SET("GameData","cover_ext","tp_light","safety_value", 4.5) rgd:SET("GameData","cover_ext","tp_smoke","safety_value", 2.5) rgd:SET("GameData","cover_ext","tp_garrison_cover","safety_value", 10) rgd:SET("GameData","cover_ext","tp_heavy","posture", "prevent_standing", true) rgd:SET("GameData","cover_ext","tp_heavy","posture", "prevent_prone", true) rgd:SET("GameData","cover_ext","tp_light","posture", "prevent_standing", true) rgd:SET("GameData","cover_ext","tp_light","posture", "prevent_prone", true) rgd:SET("GameData","cover_ext","tp_garrison_cover","posture", "prevent_prone", true) rgd:save() end

==========Weapon Cover Table

function each_file(rgd) rgd:SET("GameData","weapon_bag","cover_table","tp_heavy","accuracy_multiplier", 0.4) rgd:SET("GameData","weapon_bag","cover_table","tp_heavy","damage_multiplier", 0.2) rgd:SET("GameData","weapon_bag","cover_table","tp_heavy","suppression_multiplier", 0.6) rgd:SET("GameData","weapon_bag","cover_table","tp_light","accuracy_multiplier", 0.6) rgd:SET("GameData","weapon_bag","cover_table","tp_light","damage_multiplier", 0.4) rgd:SET("GameData","weapon_bag","cover_table","tp_light","suppression_multiplier", 0.8) rgd:SET("GameData","weapon_bag","cover_table","tp_garrison_cover","accuracy_multiplier", 0.2) rgd:SET("GameData","weapon_bag","cover_table","tp_garrison_cover","damage_multiplier", 0.1) rgd:SET("GameData","weapon_bag","cover_table","tp_garrison_cover","suppression_multiplier", 1) rgd:save() end

==========Increase Line of Sight

function each_file(rgd) rgd:SET("GameData","sight_ext","sight_package","outer_radius", 50) rgd:save() end

==========Apply Elevation Bonus

function each_file(rgd) rgd:SET("GameData","sight_ext","apply_elevation_bonus", true) rgd:save() end

==========Remove Retaliation Plan

function each_file(rgd) rgd:SET("GameData","squad_combat_behaviour_ext","squad_ai_file", "") rgd:SET("GameData","squad_combat_behaviour_ext","squad_ai_pinned_file", "") rgd:SET("GameData","squad_combat_behaviour_ext","squad_ai_reaction_file", "") rgd:SET("GameData","squad_combat_behaviour_ext","squad_ai_retaliation_file", "") rgd:save() end

==========Remove Man Power UPkeep

function each_file(rgd) rgd:SET("GameData","cost_ext","upkeep","manpower", "") rgd:save() end

==========Death Seconds = 6000

function each_file(rgd) rgd:SET("GameData","casualty_ext","maximum_death_time", 8000) rgd:SET("GameData","casualty_ext","minimum_death_time", 8000) rgd:SET("GameData","casualty_ext","splat_seconds_after_death_or_rescue", 20) rgd:save() end

==========Tank Wrecks Delete when Dead

function each_file(rgd) rgd:SET("GameData","health_ext","delete_when_dead", false) rgd:SET("GameData","health_ext","hitpoints", 6000) rgd:save() end

Now, I trust you'll know how to use these, but if you don't... You go to the lowest level, top directory that contains the RGD's that you wish to moddify. For example, If I want to use a macro on ALL the American Rifles, I would go to... attrib\attrib\weapon\allies\small_arms\single_fire\rifle I would then right click on the 'rifle' folder, and go to "Run Macro over the RGDs in this Folder" A dialog box is displayed, where you enter the Macro Code into the provided text box, then click the "Run Maco" buton

Once the macro has been completed, you will be displayed the output where you are safe to click close. A Macro will apply the same changes to each RGD in the folder it is ran on.

If you require any help with Macro's or any other modding excluding Scar coding, I'm here to help I've also done a bit of AI coding so I'm relativly comfortable in that area




iDeekz

Sniper Regiment

50 XP

15th February 2008

0 Uploads

1,052 Posts

0 Threads

#2 11 years ago

Very nice, well done.




Sgt. D. Pilla

Uber Geek

50 XP

23rd October 2007

0 Uploads

3,473 Posts

0 Threads

#3 11 years ago

Why thankyou :)