Page 1 of 2 12 LastLast
Results 1 to 20 of 28

Thread: Modding Guide for Novices

  1. #1
    Hetairos's Avatar Roma Surrectum II
    Join Date
    Jan 2014
    Location
    Serdika
    Posts
    1,511

    Icon3 Modding Guide for Novices

    Last Update: 26th Juni 2014

    Table of Contents I. Table of Contents

    1. Basic Overview
    2. What is ESF Editing?
    3. What is DB Editing?
    4. What is Scripting?
    5. What about 3D Animation, Modeling and Graphics?
    6. What about Sounds and Media?
    7. Where to begin?
    8. Words from the Author
    9. Compilations and Overview for Novices: Essential DB Tables
    10. Combat Mechanics
    11. Tutorials from the Legends



    Basic Overview 1. Basic Overview

    1.1. Your Primary Contact Points


    1.2. Your Primary Areas of Operation


    1.3. Your Primary Tools of Operations



    ESF Editing 2. What is ESF Editing?

    2.1 Introduction to ESF Editing

    ESF ("External Save File" or "Empire Serialization Format") defines the starting environment of campaigns and provides snapshots of ongoing campaign states in a retrievable data format.

    When we speak about ESF editing we have to differentiate between the following two forms:

    • Start Pos ESF: The starting position (startpos.esf) is a template which defines the starting conditions of all new campaigns.
    • Save File ESF: The save files use the same format as starting positions and define the starting conditions of all save games.

    Both ESF forms can be modified, since both do define starting conditions. From that viewpoint save games are nothing else than gradual snapshots of "new" starting conditions. Within each campaign state there is a natural delta to the next previous campaign state. Changes to the startpos.esf are oftentimes NOT save game compatible.

    2.2 Examples of ESF Editing

    ESF editing deals with basic campaign states such as starting dates, turns per year, regional holders, starting generals, starting armies, starting admirals, starting fleets, starting garrisons, starting agents, but also with many associated entities such as unit types, building types, experience levels, traits, public order, casualty level of units, research progression, diplomacy status and much more. As a rule of thumb think of the editable content within the art of ESF editing as everything that defines the starting conditions of new campaigns and their gradual states of progression through ones campaigns. As a conclusion, everything you'd expect in the startpos.esf file can be found in your stored save games and vice versa.

    2.3 Tools for ESF Editing

    • Assembly Kit Beta: startpos.esf functionality (through "Tweak"), requires data to be in pack file format, best for startpos.esf editing (due to dealing with the tabulated ESF form)
    • EditSF: reads the raw file instead of pack file formats (EditSF Only), best for save file editing (due to not requiring pack files)
    • PFM + recent DB Schemata: startpos.esf functionality, requires data to be in pack file format
    • Savegame Parser: This was initially a support tool and is currently expanding into a editor itself as well.


    DB Editing 3. What is DB Editing?

    3.1 Introduction to DB Editing

    DB (Database) editing is the one classical area of operations for developers. DB editing is the subject of editing the games database which is being reflected as various tables full of entities, statistics and values that define almost every aspect of the game. DB editing ranges from:

    • DB editing affecting text entries: e.g. descriptions, names and historical quotes
    • DB editing affecting junction entries: e.g. classification of units, unit abilities to units, cultures to factions and much more
    • DB editing affecting game mechanics: e.g. effects, overall battle mechanics, overall campaign mechanics, unit statistics and upgrade paths
    • DB editing affecting game functionality: e.g. camera behavior, environmental lighting, UI design

    3.2. Examples of DB Editing

    As mentioned above everything that affects game functionality, game junctions and game mechanics can be edited in the database. As a rule of thumb database files store data that is used to determine entities, junctions and properties of game aspects that are going to be same every time they appear somewhere in-game (contrasting with ESF editing where the data is NOT the same, but a matter of change dependent on the ongoing campaign progress).

    3.2 Tools for DB Editing

    • Assembly Kit Beta: This is the official developers kit and a must have reference point. Although it is not the primary tool used for DB editing at all.
    • PFM + recent DB Schemata: This is the primary tool used by the majority of developers. PFM is much more applicable than the assembly kit beta.


    Scripting 4. What is Scripting?

    4.1 Introduction to Scripting

    Scripts as the name implies are lists of commands that can be executed without user interaction. Scripts have a specific programming language with which you can write scripts. On contrary to DB editing scripting does not affect the game mechanics in general and is not affected directly by player interaction. Instead scripting is linked to specific events or triggers. Triggers indeed can be activated by the player itself. Although the player interaction is only indirectly responsible for the script commands. The player usually does not know about scripts and their outcome. Triggered scripts provide new conditions for your ongoing campaign that can be looked upon as ESF starting conditions that are "new" and partially while playing the game. However scripts trigger once and are not able to change their state like progressing save files. Scripting in Rome II runs on the LUA programming language, which is a C based language specifically designed for scripting purposes. However, scripting possibilities with Rome II are said to be very limited, respectively it is more presumably that the scripting knowledge in the developers scene for Rome II is dumping on a low level yet, which might change in future.

    4.2 Examples of Scripting

    As a general rule of thumb think of scripting as being a series of events that have to be triggered within the game. For example it is possible to script reforms once a certain year has passed or to script a regional revolt once a faction reaches a certain expansion. In theory it is possible to script the spawning of generals, the spawning of armies, the gifting of money, the gifting of traits and any other event one can think of. Scripting can be a very creative task, but requires extensive knowledge about the scripting language.

    4.2 Tools for Scripting

    • PFM + recent DB Schemata: scripting functionality
    • Notepad++: It is highly recommended to use this dedicated editor for scripting purposes.



    3D Animation, Modeling and Graphics 5. What about 3D Animation, Modeling and Graphics?

    5.1 Introduction to 3D Animation, Modeling and Graphics

    This is the first area specifically designer for artists. Usually when speaking about visuals one can refer to:

    • Modeling: Contains 3D modeling of buildings, units and more.
    • Texturing: Contains 2D texturing of buildings, units and more.
    • 3D Animations: Contains the animation of 3D models of any kind.
    • Graphics Editing: Contains the editing of all graphical aspects of the game.

    Even though both areas are highly artistic work they are very much linked to oftentimes complex and repetitive DB editing work.

    5.2 Tools for 3D Animations, Modeling and Graphics

    • 3DS Max: This is used for modeling and rendering.
    • Gimp: This is used for skinning and texturing.
    • Photoshop: This is used for skinning and texturing.



    Sound and Media 6. What about Sound and Media?

    6.1 Introduction to Sound and Media

    This is the first area specifically designer for artists. Usually when speaking about visuals one can refer to:

    • Cutscenes: This is all about cutscenes. Porting custom made cutscenes into Total War: Rome II is currently NOT possible (as of the July 2014).
    • Soundtracks: This is all about music and soundtracks.
    • Sound Effects: This is all about sound effects, voices and such.

    Even though all areas are highly artistic work they are very much linked to oftentimes complex and repetitive DB editing work.

    6.2 Tools for Sound and Media

    • Wwise: This is the officially licensed and only audio editing program for Total War: Rome II.



    First Steps 7. Where to begin?

    7.1 Do Your Homework

    The easiest way to enter the world of Total War: Rome II development is to do your homework. Creating modifications is not easy and there is also no short cut to get into it. Hence, it is highly advisable to bookmark the necessary links, to download the desired tools and to start to get a basic overview about development in general. Once you feel familiar with the areas of operations it would probably be the easiest way to aim for classical DB editing. Most of the content of DB editing is far easier to change and tweak than with ESF editing or scripting, which can be learned after solid knowledge of the database and its possibilities and structure.. If you are an artist than you must make a choice. Do you want to focus on design or music only and eventually depend on other developers to import your work into the game or do you want to work independently and be able to import your material on your own? Apparently, both ways do have their pro's and con's. So as a general rule of thumb most people will usually start their development career with DB editing. The learning curve is quiet steep. Once you know what can be done and where entities can be found, than everything will be simply part of an trial and error process. Once you feel comfortable the actual creative and interesting process of development starts: The implementation of your OWN visions into your OWN modifications!

    7.2 Build Your Network

    The area of operations of Total War: Rome II development is extreme. The main limiting factor of your development process is time. Therefore extensive networking is crucial. Networking has the following advantages:

    • Socializing
    • Exchange of Knowledge
    • Sharing of Content
    • Troubleshooting
    • Specialization
    • Manpower
    • Testing

    Development was and is a matter of teamwork. One man shows are usually limited by energy, motivation and time.

    7.3 Respect Each Others Work

    Don't forget that there is no superior or better work. There is just different work. Respect the effort of other developers. Always ask for permission to use third-party work and always give proper credits. Furthermore, keep in mind that artists, beta testers and many more jobs I've not listed yet are just as important as being a lead designer of a total conversion modification. Definitely avoid to unnecessarily criticize or slam on a fellow developers work.


    Last Words 8. Words from the Author

    I don't assume to have the right to patronize people. I simply want to take the chance to share a few of my experiences and give you guys a few tips:

    8.1 Be Patient

    Consistency is crucial. Be patient and don't aim for quick success. Burning or "boring" out is not unusual.

    8.2 Focus

    Focus is essential for high quality. It is easy to loose oneself in the complexity of the cause. Try to NOT aim for too much at a time.

    8.3 Share our Vision of Open Source (!)

    Vanity within the community is unfortunately still existent here and there. Of course there is a real competition between modifications about attention and users. However that fact doesn't justify for a protective, toxic or unsupportive behavior towards fellow developers. I can only appeal to everyone who is new to Total War: Rome II modifications to keep your feet on the ground and always stay supportive yourself. Caring and sharing with fellow developers is so much more fun and creates an attractive and supportive working atmosphere. Let me give you a few examples of possible attitudes:

    First Example
    Ten people work on a total conversion modification. None of them shares content with each other. Everyone has to redo all aspects of the game. The progression of all ten modifications is slow. The overall quality of the modifications is variable. The fight for attention and users is immense since everyone works on the same areas as all others do. Five people give up in the process. The atmosphere is tense.
    Second Example
    Five people work on a total conversion modification, five people focus on specific tasks. Five people who focus on a specific task become specialists. The quality of their content is high. They share their content. The total conversion modifications, become better. There is more time to distinguish ones modification from each the others and focus on specific visions. The atmosphere becomes warmer.
    Third Example
    Everyone works on their favorite area of operations. Everyone share everything with the community. Everyone provides tutorials about their area of operations. The content quality is excellent. Due to the sharing, all ten developers have enough time to not only work on their own area of operations, but create unique total conversion modifications within that supportive framework. The progression of all modifications is high. Nobody gives up on the process. Everyone has more time to create and focus on a unique modification. Users have the choice to subscribe to their favorite modification. The atmosphere is amazing, motivating and supportive. Novice developers are attracted.
    Those are overly stylized examples of course, but with the sole reason to show that open source development, a collaborative and supportive community can reach much further than an isolated and protective one. It does absolutely make no sense to be vain within the TWC family. We do work with and for the community and keep in mind that nobody "owns" history. Keeping people at bay for the sake of placing their own modification before others, does more harm than good to the overall community. So, please share our vision of open source to all the people out there. Share, support and respect each others work.

    Thank you!

    Compilation & Overview for Novices: DB Tables 9. Compilation & Overview for Novices: Essential DB Tables

    Compilation: Essential DB Tables
    - buildings_units_allowed --> buildings required to recruit specific units (campaign)
    - land_units --> land unit stats table (campaign & battle)
    - naval_units --> naval unit stats table (campaign & battle)
    - land_units_to_units_ability_junctions --> land unit abilities table (battle)
    - naval_units_to_units_ability_junctions --> naval unit abilities table (battle)
    - main_land_units --> unit campaign entities such as cap limits, recruitment times, types etc. (campaign)
    - unit_set_to_units_junctions --> unit groups (overall)
    - unit_variants --> unit variantmeshes, UI icons and more (overall)
    - units_custom_battle_permissions --> Which factions can use the unit in custom battles (custom battles)
    - units_to_groupings_military_permissions --> Which factions can use the unit (campaign)

    - armed_citizenry_units_to_unit_groups_junctions --> set the unit up as a garrison unit in buildings (campaign)
    - commander_military_unit_permissions --> make the unit available as a general's bodyguard in the campaign (campaign)
    - unit_required_technology_junction_tables --> this will add a technology requirement for the recruitment of a unit on top of the building one. (campaign)

    - variant --> if your unit uses custom variantmeshdefinitions, you need to list them here.
    - land_units.loc --> all land units are listed here. If a unit is not here it won't be in the game.
    - naval_units.loc --> guess what?? same for naval units
    - unit_description_short_texts.loc --> a mini customized description of the unit. If you make one you will need to add the unit_description_short_texts db table and add its entry there.
    - unit_description_historical_texts.loc --> a more detailed description of a unit or a class of units. If you make one you will need to add the unit_description_historical_texts db table and add its entry there.

    even more additions provided by crzrndm :

    melee_weapons --> melee weapons damage, bonus vs. infantry/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
    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.
    campaign_ground_type --> contains the movement costs for all terrain, including the various types of water

    Combat Mechanics 10. Combat Mechanics

    10.1 Basic Knowledge

    Smallest Combat Entity
    It is important to understand that in Rome II the smallest combat entity is the individual soldier e.g. when you land several hits it doesn't matter if soldiers were hit in the leg, torso or head. The engine and the performance limitations wouldn't have been able to handle a more sophisticated system yet.

    Unit Class, Unit Weight & Unit Badge
    There are about 17 unit classes in the game:

    00 - Fixed Artillery
    01 - Field Artillery
    02 - Siege Artillery
    03 - Melee Cavalry
    04 - Missile Cavalry
    05 - Shock Cavalry
    06 - Chariot
    07 - Command
    08 - Elephant
    09 - Melee Infantry
    10 - Missile Infantry
    11 - Pike Infantry
    12 - Spear Infantry
    13 - Artillery Ship
    14 - Melee Ship
    15 - Missile Ship
    16 - Transport Ship
    17 - Special

    Each unit that is in the game belongs to one of those unit class entities which again are divided into weights classes:

    1 - Very Light
    2 - Light
    3 - Medium
    4 - Heavy
    5 - Very Heavy
    6 - Super Heavy

    e.g. Companion Cavalry = Very Heavy Shock Cavalry

    Number of Troops
    The number of troops statistic looks rather trivial, but it is more than that. It triggers replenishment and is governed by the replenishment mechanics. It is also responsible to define the maximum casualties allowed before a unit will be disbanded.

    Kills, XP and Unit Experience Level
    Those statistics seem to be self-explanatory as well, but there are many tables that are affected by those. For example it is affiliated with the entire unit experience mechanics (e.g. how many XP per kill / how many XP until unit moves up an experience level) and the entire level bonus mechanics (e.g. which combat bonuses are being improved upon experience level).

    10.2 Missile Combat Mechanics

    Missile Range
    Defines the range of your missile troops. It is also affiliated by the units accuracy and dispersion (e.g. units being less accurate on maximum than on close range). On a side note, terrain superiority does not affect the missile range. Hence, units that are firing form a high ground do NOT get a range bonus due to engine shortcomings. Instead they will get a damage bonus (very unlucky mechanic that can't be changed unfortunately).

    Missile Damage (Base Damage & Armor Piercing Damage)
    Defines the amount of damage a hit inflicts. Damage is subtracted from the remaining health points of a man that is hit. If a projectile does not hit, there will be no damage (of course ^^). If a hit is being landed we have to differentiate between base damage & armor piercing damage. Armor piercing damage is easy to calculate, because it will simply be applied 100% of the time with its full damage potential. Base damage although does take armor into account calculating the incoming damage potential. Armor again is divided into base value and shield value. The shield value can be neglected if a unit is being shot at from the right and from the rear, but NOT if shot at from the front or left. Base damage is linked to a dice roll that takes into account the base damage statistic vs the base value & base shield value of the armor statistic. Results can vary from a hit that doesn't apply base damage to hits that range from minimum to maximum damage application. The exact calculation of the base damage will be found under the "Melee Damage" section below once everything is updated.

    Shots per Minute & Ammunition
    Defines how many volleys a unit can fire per minute and how much ammunition it has at its disposal. This is used for balancing issues and has to be well adapted concerning shots per minute, ammo available, range and damage applied (e.g. a more devastating projectile such as the javelin is being thrown at a slow rate, has a low amount of ammunition, is a very close range weapon, but has a devastating effect while on contrary slingers operate with a more ammunition, can reload quicker, can aim at very long distances, but have a less devastating effect).

    10.3 Melee Combat Mechanics

    Melee Attack vs Melee Defense (Base Value & Shield Value)
    Those two melee statistics define the first dice roll of combat: The chance to hit or to be hit. This is the first dice roll that defines if damage is being applied (as a comparison in missile combat the first dice roll that rules about the outcome if a soldier is being hit or not depends on the range, accuracy and the dispersion of the unit that is firing and the speed of the unit that is being fired upon). Melee defense is once again divided into base value and shield value. Hence, it is more likely to hit a unit when attacked from the rear or right side as the shield value will be completely neglected.

    Armor (Base Value & Shield Value)
    Armor is also divided into base value and shield value. Compared to the health points armor does not diminish over time (e.g. there is no direct simulation of shields or armor being broken or damaged throughout prolonged combat). Base value is constant at any times and shield value can be neglected when a unit is being shot at or attacked from its right or rear, but not when being shot at or attacked from its left or front. Armor is especially important for the second dice roll (first dice roll being the one that defines if a hit lands aka Melee Attack vs Melee Defense) dice roll that defines the chance of "base value"-damage being applied and IF being applied how much of the damage potential goes through the armor. Hence outcomes of landed hits may vary from none to everything between minimum and maximum base damage. Armor piercing damage goes through armor and shield at any time and applies 100% of its damage potential (e.g. an arrow with 10 base damage and 5 armor piercing damage lands a hit on a man with 5 health points remaining. no matter if the man wins the dice roll against the base damage and blocks the base damage, the 5 armor piercing damage will be already sufficient to finish him off by going directly through the mans armor subtracting 5 armor piercing damage from the last 5 remaking health points of said man).

    Weapon Damage (Base Damage & Armor Piercing Damage)
    This is similar to the missile damage statistic and is (or was) divided into base damage and armor piercing damage as well. Any hit will be subtracted from the health point system. Armor piercing damage will be subtracted 100% of the time with its full damage potential while base damage will need to go through a second dice roll to define IF and how much damage will go through the armors base value & shield value.

    Edit: Does this still hold true after weapon deadliness and weapon initiative has been added to the game? Once I can confirm I will include the exact formula as well.

    Weapon Initiative vs Weapon Deadliness
    Edit: Look at 9.3. This is something I don't understand yet. Need confirmation first.

    Mass, Impact Velocity & Charge Bonus
    Every unit has a certain amount of mass that defines how strong it is when defending against charges (bracing or absorbing charging damage), charging themselves (inflicting collision damage) and being knocked down (breaking formations). Charge bonus does exactly that, giving a unit a bonus on its mass, bracing bonus, impact velocity and its collision damage applied. Tip: Stationary units are provided with an additional bracing bonus compared to units that are running or charging themselves.

    Bonus vs Infantry & Bonus vs Large
    Those bonuses are similar to the charge bonus and improve the effectiveness of a unit versus infantry (bonus vs infantry statistic) and versus mounted units (bonus vs large statistic).

    Edit: I can not confirm yet, what statistics are provided with a bonus, but it might be a "damage bonus" and a "chance to hit bonus". Looking for conformation.

    10.4 Battle Mechanics

    Health
    In Rome II every man of a unit shares a certain amount of health points. Once a man runs out of health points he dies. Health points do NOT recover over time.

    Base Morale
    Morale defines the morale stability of a unit. In Rome II you do not have to annihilate a unit completely. It is just as sufficient to rout the entire opponents army to win the battle. Hence, the amount of morale defines how long a unit will stay on the battleground and how strong it will withstand combat under unfavorable conditions as being shot at with projectiles and / or attacked from the flanks or rear. The morale mechanics provide you with two routing stages which are firstly routing (the unit flees the field, but has a chance to regroup and return to the action IF they are not being pursued) and secondly shattered (the unit flees the field and will NOT return). Hence, managing ones units morale levels is extremely important. Effects that influence morale are flanking maneuvers, being shot at, dying generals, unit abilities and many more. Morale does under favorable conditions recover over time.

    Speed
    Speed defines how fast a unit is and can decrease / increase depending on the units exhaustion level.

    Movement Points (Campaign only)
    This defines the distance a unit can be moved around the campaign map.

    Exhaustion
    The more exhaustion a unit is suffering the slower it will become, the less morale it will have and the less combat effective it will be. Units are able to recover from exhaustion.

    Edit: The exact effects on combat efficiency are not known yet. Further research needed.

    10.5 Abilities, Formations & Spacing

    Unit Depth
    Unit depth is being used to define the bracing and charging ability of a unit (e.g. the more ranks it has the more it will withstand charges or the more damage will be inflicted by charging themselves). Unit depth works as a multiplier of the mass value and hence indirectly affects the bracing and charging ability of units.

    Edit: The exact effects of the formula is not known yet. Further research needed.

    Formations & Abilities
    Formations do alter the unit depth and spacing. Those and abilities can grant units with certain bonuses on their combat statistics (e.g. higher bonus vs large, better defensive statistics, improved protection against projectiles, a charge bonus, a exhaustion bonus OR mauls, a morale boost etc. Most formations and abilities are trade-offs and can make units slower, more vulnerable against charges, exhaust them heavily after a certain time period and many more effects). There is a huge variety of effects that come with formations and abilities and is a very interesting area of the game.

    10.6 Hidden Combat Mechanics

    Compilation: Hidden Combat Mechanics
    There are many combat mechanics that are not linked to the units themselves. Those are:
    - terrain effects (e.g. what are the bonuses when attacking from higher ground?)
    - projectile effects (e.g. what is accuracy, spread, calibration distance, dispersion, marksmanship bonus?)
    - fatigue effects (e.g. when does a unit reach a new fatigue level, how long does it take to recover and what are favorable conditions?)
    - morale effects (e.g. when does a unit reach a new morale stage, how long does it take to recover and what are favorable conditions?)
    - formation and formation attack effects (what bonuses and negative effects are given to those formations, what does formation attack do? etc.)
    - rear and flanking attacks (e.g. what bonuses are given to those attacks?)
    - hidding, spotting and scouting effects (e.g. how good can a unit hide in grass and how good can a unit scout and spot enemy units?)

    Tutorial from the Legends 11. Tutorials from the Legends

    11.1 General

    11.1a Modding:
    - About DB Table Fragments by crzrndm (Tip: Must Read for all new and old modders!)

    11.1b Combat Mechanics:
    - Beginners Guide: Combat Mechanics by gamepressure.com
    - Advanced Guide: Statistical Combat Analysis by crzrndm

    11.2 Modding Tools

    11.2a ESF:
    - Intermediate Guide: How to use PFM & ESF for startpos.esf and save file editing by Dresden

    11.2b PFM:
    - Beginners Guide: How to use PFM by daniu
    - Beginners Guide: How to make a customs unit by blackheartz
    - Beginners Guide: How to create and use a mod pack by crzrndm
    - Video Tutorial: Creating a new unit by Scott Lindsey

    11.2c Assembly Kit Beta:
    Note that the Assembly Kit Beta contains the following Sub Tools:

    - TWeak: DB Editing, e.g. changing unit stats
    - BOB: Creating and Exporting your Pack Files
    - Variant Editor: Visual unit editor, e.g. changing unit appearances

    Here are the beginners guides for those Sub Tools:

    - Beginners Guide: How to use TWeak & BOB by .Mitch.
    - Beginners Guide: How to use Variant Editor by Mackles
    - Beginners Guide: How to edit a startpos.esf with the Assembly Kit by Dresden

    11.2d Other Tools:
    - Photoshop and Rome II Modding by Noif de Bodemloze
    - Hex Editors and Rome II Modding by Ahiga

    11.3 "DB Tables Explained" Series

    11.3a Compilation: "DB Tables Explained" Series:
    - DB Tables Explained: Buildings System by crzrndm

    11.4 Even More Resources

    11.4a General Resources
    - Tools, Tutorials and Resources by General George S. Patton

    11.5 Even More Resources

    11.5a General Resources
    - Magnar's Modding Video Tutorials by Magnar
    - CrzyRndm's Modding Resources by crzyrndm
    - Sebidees Complete Guide to Unit Creation by Sebidee

    11.5b Official TWC Catalogue (TWC Scriptorium)
    - The Catalogue Pt. 3: Modding Tools & Resources (MUST VISIT!) by the TWC Scriptorium

    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.

    Cheers
    Alec
    Last edited by Hetairos; June 26, 2014 at 03:01 PM.

  2. #2

    Default 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!
    Campaign modder for Ancient Empires


  3. #3
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Re: Modding Guide for Novices

    Quote Originally Posted by alecwermuth View Post
    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 View Post
    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 View Post
    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
    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 View Post
    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
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

  4. #4
    Hetairos's Avatar Roma Surrectum II
    Join Date
    Jan 2014
    Location
    Serdika
    Posts
    1,511

    Default 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

  5. #5
    Hetairos's Avatar Roma Surrectum II
    Join Date
    Jan 2014
    Location
    Serdika
    Posts
    1,511

    Default 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
    Last edited by Hetairos; February 13, 2014 at 01:23 PM.

  6. #6
    Hetairos's Avatar Roma Surrectum II
    Join Date
    Jan 2014
    Location
    Serdika
    Posts
    1,511

    Default 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).
    Last edited by Hetairos; February 14, 2014 at 08:37 AM.

  7. #7

    Default 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? :<

  8. #8
    Hetairos's Avatar Roma Surrectum II
    Join Date
    Jan 2014
    Location
    Serdika
    Posts
    1,511

    Default Re: Modding Guide for Novices

    Quote Originally Posted by sergistark View Post
    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:

    Your Primary Modding Tools: EditSF / PFM + recent DB Schemata ...
    Once done they shouldn't be red anymore.

    Cheers

  9. #9
    Hetairos's Avatar Roma Surrectum II
    Join Date
    Jan 2014
    Location
    Serdika
    Posts
    1,511

    Default Re: Modding Guide for Novices

    Added:
    Tutorials from the Legends

    + little bit of formating and polishing done.

  10. #10
    AngryTitusPullo's Avatar Comes Limitis
    Join Date
    Jan 2006
    Location
    Kuala Lumpur
    Posts
    13,018

    Default Re: Modding Guide for Novices

    Moved from Misc to Tutorial.


    CIVITATVS CVM AVGVSTVS XVI, MMVI
    IN PATROCINIVM SVB Dromikaites SVB MareNostrum SVB Quintus Maximus
    Want to know more about Rome II Total Realism ? Follow us on Twitter & Facebook

  11. #11
    crzyrndm's Avatar Artifex
    Join Date
    Feb 2011
    Location
    New Zealand
    Posts
    2,576

    Default Re: Modding Guide for Novices

    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
    It’s better to excite some and offend others than be bland and acceptable to all
    Creating a mod.pack with PFM - Database Table Fragments

  12. #12
    Inevitability won
    Patrician Citizen

    Join Date
    Mar 2010
    Posts
    9,594

    Default 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".

  13. #13
    AngryTitusPullo's Avatar Comes Limitis
    Join Date
    Jan 2006
    Location
    Kuala Lumpur
    Posts
    13,018

    Default Re: Modding Guide for Novices

    Quote Originally Posted by .Mitch. View Post
    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 ?


    CIVITATVS CVM AVGVSTVS XVI, MMVI
    IN PATROCINIVM SVB Dromikaites SVB MareNostrum SVB Quintus Maximus
    Want to know more about Rome II Total Realism ? Follow us on Twitter & Facebook

  14. #14
    Hetairos's Avatar Roma Surrectum II
    Join Date
    Jan 2014
    Location
    Serdika
    Posts
    1,511

    Default Re: Modding Guide for Novices

    Good question actually: What does ESF finally stand for?

  15. #15
    Mackles's Avatar Roma Invicta
    Join Date
    Aug 2013
    Location
    UK
    Posts
    309

    Default Re: Modding Guide for Novices

    Nice collection of threads alec. Not given up on the official forums have you?

  16. #16
    Hetairos's Avatar Roma Surrectum II
    Join Date
    Jan 2014
    Location
    Serdika
    Posts
    1,511

    Default 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

  17. #17

    Default 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.

  18. #18

    Default 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.

  19. #19

    Default 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.

  20. #20
    Hetairos's Avatar Roma Surrectum II
    Join Date
    Jan 2014
    Location
    Serdika
    Posts
    1,511

    Default 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.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •