PS: Please feel free to correct or help to expand this guide to provide all the new novice modders out there with the necessary knowledge to start their own research and works as quick and painless as possible. :thumbsup2
Cheers
Alec
February 11, 2014, 01:59 AM
Sheridan
Re: Modding Guide for Novices
1. ESF editing allows you to change regions and region ownership completely. For example, you can change the starting garrison/armies in a region to your liking, or the buildings. Editing it is pretty tricky to learn and personally I have very little experience with it, so someone else will have to fill in the rest from here. :)
2. Database editing allows you to change many of the things you see in the game, ranging from unit statistics and battlefield cameras to campaign mechanics and historical quotes. Most of the things in the database are far easier to change than in the efs.startpos. For database changes PFM is generally sufficient, you can use TWeak as well but in most cases it won't be necessary.
Let's jump straight to some of the combat mechanics
The Attack value of a unit determines how likely a soldier in it is to hit a soldier from an enemy unit. Weapon Damage determines how deadly a successful attack (hit) will be. For example, if two units fighting each have 1 HP and 1 Weapon damage, each successful hit might be sufficient to kill an opponent. Note that the armour value plays a significant role in this too as it might block away the damage (or part of it). Armour-Piercing damage is always applied upon successful hit, meaning that armour gives no protection against it. Charge Bonus along with the mass of a unit and its impact velocity (charge speed), plus a few other combat mechanics in kv_rules (collision_damage), determines how deadly a charge is. Decreasing either of these three main values means that the charge will be less effective, whether it be cavalry or infantry, and vice versa. Melee Defense is basically the opposite of melee attack. The higher the value, the more likely a soldier is able to fend off an enemy attack. This is easy to notice when you are fighting pikemen, as units with high defense values will have a much easier time getting through some of the pikes while units with low defense will struggle to get past. The shield value for armour and defense simply add to those respective stats. I recommend removing shield armour alltogether as it makes no sense in the first place - armour determines how likely a soldier is to survive when an enemy soldier is performing a successful hit, meaning that at that point, the enemey soldier has already come past your shield and only your body armour helps. The shield is not going to do much good if you get stabbed, if you see what I mean. It should only contribute to defense as it would help you to block enemy attacks, and a chance to deflect enemy missiles (arrows/stones/javelins).
This is all I have time for at the moment, duty calls. Hope it helps a little bit! :thumbsup2
February 11, 2014, 02:36 AM
crzyrndm
Re: Modding Guide for Novices
Quote:
Originally Posted by alecwermuth
1.) What is ESF Editing? What are the aspects and the content of startups.esf editing?
2.) What is DB Editing? What are the aspects and the content of DB editing?
3.) What is Scripting? What are the aspects and the content of scripting?
1) ESF or External Save Files store data about the current state of a campaign. They come in two forms, the startpos, which is used as the template to create new campaigns, and save files to store current campaigns. ESF Modding normally deals with the startpos (as it is applied to every campaign), and deals with who holds what locations, current armed forces, agents, and so on. Basically everything you'd expect for a save file is also in the startpos.
2) DB or DataBase files store data that is used to determine the properties of almost every action that is going to be the same every time it appears. Unit stats and abilities, event effects, upgrade paths, UI displays. Every time a particular unit is created, it draws on the same data for it's melee attack stat, no matter how many campaigns you try it across, hence the melee attack stat is stored in the database.
3) Scripting in Rome 2 runs on the Lua language, which is a C based language designed for scripting purposes. Sadly, scripting possibilities with Rome 2 are very limited, with only a few possible effects (give money/unit, lock unit/building, give trait/ancilliary about covers it). There are some dedicated individuals on this form that can assist you with endeavours in this area, but it can be very difficult to make anything particularly inspiring on the scripting front.
Quote:
Originally Posted by alecwermuth
4a.) Which of the aspects above can be edited with PFM? What are its strengths? Any drawbacks by using this?
4b.) Which of the aspects above can be edited with EditSF? What are its strengths? Any drawbacks by using this?
4c.) Which of the aspects above can be edited with Mod Manager? What are its strengths? Any drawbacks by using this?
4d.) Which of the aspects above can be edited with the Rome II Editor? What are its strengths? Any drawbacks by using this?
4e.) Which of the aspects above can be edited with the Assembly Kit? What are its strengths? Any drawbacks by using this?
A) PFM can edit all three, although they need to be included in a pack file before it can read them. Good for DB and ESF work, but I'd highly recommend a dedicated editor for scripting (eg. N++). Good for multiple mods.
B) ESF only, reads the raw file instead of requiring it to be included in a pack. Best for save editing
C) Mod manager is not an editing tool
D) R2E is a support tool for some DB Editing through PFM. Used for unit related editing
E) Assembly kit currently has DB and startpos functionality through TWeak. Easily the best way to do startpos editing as you're dealing with tabulated form, not the raw tree form. Some advantages with DB editing due to dependencies, but can be an issue to work with multiple mods.
Quote:
Originally Posted by alecwermuth
PS: Here I am particularly looking for addition tables AND the tables that tweak ranged weapons, melee weapons, morale, fatigue etc. (I know that combat balance doesn't work by tweaking a unit only, but also the overall mechanics concerning ranged weapons stats, melee weapons specifications, terrain effects, formations buffs / drawbacks, rear/flank attack effects, moral and fatigue systems etc. that are applied to ALL UNITS regardless of their individual stats.
melee_weapons - damage, bonus vs. inf/mounted
missile_weapons - default projectile, precursor, can fire at buildings
missile_weapons_to_projectiles - Alternate projectiles
projectiles - launch speed, damage, explosions, arc, number, spread, etc.
projectiles_explosions - explosions :surprise:
projectiles_shot_type_enum - supersedes/locked until effect
unit_armour_types - Armour/defence for armour types
unit_shield_types - Armour/defence/block for shield types
unit_* - All useful tables, too many to list individually (attributes*, fatigue_effects, experience_*, ground_type_movement_modifiers, abilities, spacings)
special_ability_phase_stat_effects - effects of abilities (all special_ability_* tables are interesting)
spotting_and_hiding_values - I think you can work this out...
kv_rules - numbers controlling rules relating to combat. Melee hit chance, fatigue, etc.
Quote:
Originally Posted by alecwermuth
PSS: I am also making a research about exact meaning, numbers and formulas of the unit stats in particular of those that are shown in the unit card stats such as:
Most of these are fairly common sense (Kills/num troops, really?).
Damage/Armour/Health and a few others explained in here: http://www.twcenter.net/forums/showt...ombat-Analysis
Bonus vs. 'X' means a damage bonus against either infantry or mounted units
Spotting/Hiding is done via the scouting attribute and the distance scalar in land_units
Class is used to distribute effects from the campaign map, and choose the UI stat panel displayed
February 12, 2014, 05:00 AM
Hetairos
Re: Modding Guide for Novices
Thank you guys for the first replies! I will sit down this evening and get through your replies to expand my compilation about those things.
If anyone has any additions I would be very glad if you could share them with us, no matter how small or big they seem. Everything can help.
Cheers
February 13, 2014, 01:20 PM
Hetairos
Re: Modding Guide for Novices
Added:
- Quick Overview - What is ESF Editing? - What is DB Editing? - What is Scripting? - Where to begin? - Upcoming projects to add to this guide
Thanks to crzrndm and Sheridan for the help on those!
If you have anything to add or correct feel free to write me a pm. Also I would be glad for any more help on the upcoming projects.
Cheers
Alec
February 14, 2014, 08:33 AM
Hetairos
Re: Modding Guide for Novices
Added: - Compilation & Overview for Novices: DB Tables - Combat Mechanics
I could need more help on the proofreading (e.g. is everything concerning the content correct?) and especially on the red signaled remarks to complete the list. Any additions are welcome as well!
Cheers
Alec
PS: Next projects for the future would be to 1.) include 1-2 examples of basic DB editing as practical examples and 2.) a compilation of the most complete tutorials and researches out there and 3.) get into the details, discuss them, understand them better and provide to the community with the foundlings (more a continuous and long term teamwork process once this guide is more sophisticated).
February 15, 2014, 04:14 AM
sergistark
Re: Modding Guide for Novices
In FPM, when i try to add files from pack, almost all of them are red and i can't edit them. what do I do wrong? :<
February 15, 2014, 05:18 AM
Hetairos
Re: Modding Guide for Novices
Quote:
Originally Posted by sergistark
In FPM, when i try to add files from pack, almost all of them are red and i can't edit them. what do I do wrong? :<
Hi
You are not doing anything wrong. PFM uses schemata that regularly need to be updated (e.g. when a new patch or DLC is released from CA) You just need to update your DB schemata here:
Bonus vs. Infantry/Mounted is damage only. Easiest way to check is give a unit no melee attack and enough damage to ensure 1 hit kills, and then compare against the same combat with a ton of bonus vs. 'X'. If it contributed to hit chances at all, you'd see a major change.
Effects of exhaustion are governed by the table unit_fatigue_effects. Currently fatigue effects movement speed, melee attack, and reload speed, but most stats can be modified if you so wish. Values above 1 can be used if so desired, with the value of Fresh always being equal to 1.
Stat: Fresh / Active / Winded / Tired / Very Tired / Exhausted
Speed: 1.0 / 0.95 / 0.9 / 0.85 / 0.75 / 0.65
Attack/Reload: 1.0 / 1.0 / 0.9 / 0.85 / 0.75 / 0.65
February 17, 2014, 10:57 PM
.Mitch.
Re: Modding Guide for Novices
Just a note, ESF isn't "External Save File", I don't know who made that up. It stands for "Empire Serialization Format".
February 18, 2014, 11:47 PM
AngryTitusPullo
Re: Modding Guide for Novices
Quote:
Originally Posted by .Mitch.
Just a note, ESF isn't "External Save File", I don't know who made that up. It stands for "Empire Serialization Format".
Not External Source Format ?
March 01, 2014, 07:50 PM
Hetairos
Re: Modding Guide for Novices
Good question actually: What does ESF finally stand for? :)
March 12, 2014, 08:19 PM
Mackles
Re: Modding Guide for Novices
Nice collection of threads alec. Not given up on the official forums have you? :poking:
April 03, 2014, 11:43 AM
Hetairos
Re: Modding Guide for Novices
added magnars video tutorials and dresdens guide about startpos.esf editing (to be found in 8.4 and 8.5) scroll down a bit :)
June 04, 2014, 03:59 PM
Causeless
Re: Modding Guide for Novices
Aww man's that's a real annoyance hearing how limited the campaign scripting supposedly is. Having no way to save state seems like it limits a huge amount... And I would've thought game mechanics would be able to be tweaked or modified through it. Doesn't DeI implement reforms via scripting? I was hoping I'd at least be able to implement new missions etc...
By the way, what do you know of battlefield scripting? I know there is the historical battles scripting, but I'm talking more about general campaign battle scripting. Do you know if it's possible, and if so, where in the game files I can find stuff relevant to it? I've found a few promising things (data_rome2.pack/script/_lib/lib_generated_battle.lua looks a little interesting), but nothing definitive.
June 04, 2014, 05:23 PM
Causeless
Re: Modding Guide for Novices
I've been looking more into it, and as far as I can see there is a "save_named_value" and "load_named_value" function in scripting.game_interface, so scripts are at least able to save and load their own custom values.
June 04, 2014, 05:26 PM
Causeless
Re: Modding Guide for Novices
"However scripts trigger only once a campaign" is at least partially misleading, too. There are several callbacks you can use to run functions.
June 05, 2014, 04:47 AM
Hetairos
Re: Modding Guide for Novices
Hi there, unfortunately when it comes to scripts, you are asking the wrong guy. Maybe some more skilled and versed scripter can hall with this problem?
PS: I heard we might get some documentations about scripting from CA, but that was just a rumor.