Modding How To
Tagged: Modding how to
February 5, 2018 at 10:09 am #5908
Hi, is there somewhere a kind of “modding how to” guide for this game engine? I guess as there are so many variants, mods around this game engine (ERAS included), that something like this exists. Why do I ask? I am a bit of a DIY guy and curious how this works. For example , how easy / possible it is to put a new mini quest into the game.
February 5, 2018 at 10:59 am #5909
I would want the same thing but haven’t seen one. I found some tutorials on PA here;
I have been thinking of starting to write down what modding tips I come across here in another forum (only because it has better formating options and as kind of advertising) and post a link to it, and then if we get an upgrade to the reef the information could be copied and pasted here. Unfortunately I don’t have the time to spare for the moment.
February 5, 2018 at 11:31 pm #5912
I have meant to take this up as a subject for a long time but just never did because I am nearly always distracted by something else I am doing or working on.
So the first thing you need to ask yourself is WHY MOD? What is the purpose of your mod? Is there something you don’t like or that you would like to be done better? The first thing you should do is collect data and analyze your premise to make certain it is valid. OR – is there something altogether new (a new feature) that the game currently does not do. In this case you need to ask yourself if you have the knowledge and abilities to add the new feature. A mod can be small or huge depending on the level of the task and how large the changes will be. The first step in the process should be to define what you want to do narratively. This will also allow you to share your idea with others who may be able to help.
For instance when I decided to first build ERAS it was in an attempt to make the game uniquely GOLDEN AGE (17th century/first two decades of 18th century) in look and feel. A big way I went about that is to ask what things could be made to look as if they fit into this time frame and what things were cluttering it up and detracting from the desired time-frame and feel/atmosphere.
Don’t get me wrong, I love late 18th century frigates – they are gorgeous! – but they have no place in a game that is set in the 1660s. They are almost a century and a half out of place. This is why I first went on my own from the original GOF mod team. I felt like the other GOF versions looked like a cheaply made pirates movie from the 1960s or like the old Pippi Longstockings movies I was exposed to as a youngster. I HATED that bad mixing. It’s not like chocolate with your peanut butter to me. Its like mixing cheese cake with lamb curry.
The opening alone in the following clip is just precious with a late 15th/early 16 century Nao doing battle with an early 19th century Ship of the Line. Where can I get a time machine that mixes everything together like that! If our game was like this – it would be in urgent need of a mod. LOL
So I set out to make convoys look correct with ships classified as merchant and war classes and also by nation. This is one of the things that sets us immediately apart from all other games. You consistently see this in any port and in any convoy you encounter. Once I had achieved that, I set to change everything else that could be with this intent in mind.
My music selection also started out life as a completely separate mod. I was trying to paint a period rich atmosphere and feel with the sounds and music.
More realistic combat sounds was also its own separate mod. I am certain this could be improved even more but its far better than what was originally offered in vanilla (often with only 1 single sound ever occurring in each area) while my offering has so MANY different blade and gun noises, cannon noises, grunting and death noises, etc…
So some examples of mods I am still working on right now are:
Period Cannon mod with 3,4,6,8,9,12,16,18,24,32,36, and 50 pounder guns. Notice that there are more correct small sizes in that line up and that 20s and 28s are gone because they didn’t exist. The 50 pounder will only be found on the largest of Spanish vessels cast by the great bell foundries in Liege. These sizes will be unique to nationality as well because 36’s were only found on Dutch and French ships. The 36’s were made by the Dutch and Dutch founded and financed foundries at Tula, Wetzlar/Asslar and in Sweden. At the end of the century the Swedes were producing the best and most reliable guns in the world! 32 pounder iron guns will only be found on English ships and in English ports. Larger guns will be more scarce and only certain ports will even have them. Curacao will be the only place that 36 pounders can be found. And on our new map Havana and Vera Cruz will be the only places that have 50 pounders. Bridgetown and Port Royal will be the only port that 32 pounders can be found. The proper gun types will be found on the proper nationality of ships they would have been seen on. The largest culverine will be a 24 pounder. etc etc etc…. I am a former US Artillery officer and believe this authenticity is very important. This will be the year that this mod is finally finished.
Cargo mod: With many new cargoes including Cochineal, Logwood, Water, Grog, and more.
New City/Harbor reskin mod: With new period and nationally correct building textures for structures and new signs as well. In addition we are working on new towns, locations, crypts, cemeteries, Indian villiages, mines, etc… as well.
Your mod might be a single weapon or a single music track or a single new character addition, new animation or ship or even just a single new reskin of an existing person, ship or weapon. It could be some new item. It could be a new place.
The mod might be something as simple as changing some script files to make ships performance change or cannon damage to change (NOTE: I think I have this pretty well covered accurately at this point as I have been tweaking the current files with literally hundreds of changes over the last 7 years.)
What is it that moves your passion to change and/or improve something? That’s what you should mod.
Keep in mind that not everyone will appreciate your mod. People who import the USS Constitution into a game set in the 1650s don’t give a crap about authenticity.
If you edit all ships to move like speed boats, most people looking for an immersive age of sail experience are probably going to really hate that. Modding should be first and foremost something you want to do for yourself because YOU my friends will enjoy the changes you make MORE than anyone else.
Once finished, then offer it up to folks. Even if you only get 5 people to download it and try it, maybe they have the same tastes as you do and even if only one of them keep it in their game – at least you know that you made yourself and one other person happy with it. Never mod because you are trying to impress the masses – that will never work, because the masses are as fickle as a buffalo herd performing ballet next to a great chasm.
So Christoph you brought up quests. Jeffrey and I have been looking into new quest lines for several years now. Notice that Jeffrey has become adept at changing dialogues now. I’m certain many of you have happened into the new little open quests like the whore quest and women making lewd offers. The madame can now reconcile with you if you forget to take her money to the priest, etc…
It really comes down to knowing where everything is. For someone wanting to write new quests the first thing I would tell you is to get familiar with the games files and where everything is kept. Do index searches and find dialogue files and trace them down to see where and how they are implemented. THEN you will start picking up clues to how quests are done. Using an existing quest as a template for making a new one is a very good start and that is exactly where Jeffrey and I are in building our current list of new quests. Look at other Storm based games as well. There are excellent things to be lifted from there.
I for one would heartily welcome some new questlines written and implemented by members! I WOULD LOVE THAT!!!
I will offer up the prize of a new ship, item or character to anyone who successfully pulls this off.
I would love to port some of the TEHO or New Horizons quests over and also would welcome unique new quests even more.
Last I will point you to the guides that I imported here for modeling:
Happy Modding and Good Luck!
February 6, 2018 at 11:04 am #5927
I have been wondering one thing about the cannon mod, or rather about cannon caliber in general. Ships carried a variety of differently sized guns. How is the in-game caliber being calculated, is it the largest guns, or the average caliber, or the most common size aboard?
I opened a thread in my more familiar hideout total war center about modding this game. I will use it mostly for my own benefit but I hope it will grow to something useful for people here and into a bit of advertising too;
Do you mind if borrow from your thorough guides?
February 6, 2018 at 4:50 pm #5932
So use anything you want Maltacus. We welcome the discussion and the publicity. I am always happy to talk about artillery. It is one of my favorite subjects. In fact your question caused me to pull an old article out of mothballs that PA! had deleted years ago. So take a look here: https://buccaneersreef.com/forums/topic/cannon-balistics-resurrected/
Next let me just say that the concept of “calibre” did not exist in the seventeenth century. Calculating bore times length of barrel gives you calibre. Guns of this time were rated on weight of shot which often allowed a standardization of bore sizes to occur. The Swedes under Gustavus Adolphus were the first modern army to standardize bore sizes so that ammunition could more easily be manufactured and supplied. Everyone followed suit thereafter and you find some navies/armies even purposely forging off size guns so that the enemy could not use captured supplies or guns effectively. Its a fascinating study.
The only thing our game does is calculate damage and range based on the size and type of gun. This is easily changed in the script code. I have modified it more times than I can count. I think we have some really good numbers right now. However, once Jeffrey’s AI modifications are complete, I will probably adjust them one last time because typical engagement ranges will by much closer than what people have come to expect with these types of games in the past.
- This reply was modified 1 week, 5 days ago by modernknight1.
February 6, 2018 at 8:21 pm #5937
Thanks, that’s quite a resource. Modelling has never been my strong point in modding.
Yeah, I know caliber isn’t really suitable for the timeframe. I used the term for simplicitys sake since that is what it’s called in the game code.
The question still stands though; how does the team decide that a certain ship should have a maximun weapon class of, say, 12-pounders instead of 8-pounders?
Since we are on the subject of artillery of the time (very interesting subject, I agree) I recalled the invention of the elevating screw for the artillery. I have seen some mentions of the invention first appearing in the middle of the 17:th century. The earliest (known) type in Sweden was engineered by the productive and inventive engineer Christofer Polhem and put to use just about the end of the golden age of piracy, although it is more associated with land artillery, particularly the light pieces. Maybe that would make a nice item boosting cannon accuracy? It would be an advanced prototype perhaps, but not more out of place in 1665 than those characters that weren’t grown up, or even born, by then.
The elevating screw, for those wondering what this is about, replaced the wedges as a means for elevating an artillery piece. It was a more efficient and stable method, and saved time and effort when operating the guns. Wedges ran the risk of being dislocated by the force of the recoil and it wasn’t the easiest thing to adjust them properly, but a large screw is obviously easier to adjust to a precise position.
February 6, 2018 at 9:07 pm #5938
What you are talking about is the elevation wedge. A mallet was used to adjust the piece until it lined up with the gunner’s quadrant. The weight of the gun would keep the wedge in place and often the bottom would have a little tar applied so it wouldn’t fly off the gun during recoil. In close battles a quadrant would never even be used.
Yeah I am totally knowledgeable of the elevation screw. Even during most of the 18th century most guns still relied on the old wedge. Only the well funded navies eventually adapted to the screw equipped carriages. They really only came into really wide spread use when improved powders and rifling (which greatly enhanced velocity) came into being. They became a standard fixture on late 18th century carronades and parrot rifles into the 19th century. I will have to think about that a little and look a little into what dates exactly they became widely accepted and manufactured. A hundred years beyond game time is a little too much IMHO – however that is certainly something we can work into ERAS3. I will note it on our list.
Actually in a future update coming out in the next several months you will no longer see characters out of period any longer. I listed this in the December News Update that this is one of our new future features. Jeffrey has this on his list and is working on it. I already provided him with a complete list of character start dates for each of our NPCs. So still about half of them will start on the traditional game date, but the other half will start at later game dates. For instance if you start with William Kidd the game will begin in 1705 and any of the other characters who would be dead or gone by then will never be encountered. If you start with Blackbeard or Roberts the start date will be 1715. etc. etc…
To answer your question on cannon sizes – that’s all on me. I am the one who has determined what size can be on what ship. I have done that by estimating size and weight of guns in comparison to the size of the ship they are mounted on. Consider that just one 36 pounder with carriage weighs over 9000 pounds (4100 kgs) or 4 and a half tons. That’s like having two automobiles one on top of another on your deck! This says a lot about the massive strength, buoyancy and cargo/weight capacities of these ships. This also gives you some idea why I have made warships have less cargo space (that and their frames/ribbing are much larger/denser and closer together than a merchant ship).
If you think I need to go smaller or larger on certain ships we can certainly have that discussion. Also I would mention that I was meaning to change many of those numbers again but was waiting to do that as part of my major new cannon mod that adds so many new weights and sizes to our ships and game world. With 3 pounders and 6 pounders added we will see much more dynamic play for smaller ships and more size restrictions than we currently have. The 3 pounders will get us close to the accuracy I want to see for ships which have mostly or many swivel guns as they were usually 1 to 2 pounders. We have no way in our game currently to mount different sized guns on the same ship and calculate damage with combined sizes simultaneously. I would love that – but it would just over-complicate things as they stand now. Perhaps someday.
February 6, 2018 at 9:26 pm #5941
Oh yeah, one other thing I wanted to mention. Regarding that link that you put up to TheBlackKnights mods and guides on PA!. He was actually working with me quite a lot before I got banned. When they threw me out of the boat, they put all of his posts together and plopped them in to replace what I had there before.
He wanted to run interference between myself and PA! knowing I was starting this new site.
However, I had some issues with that. The largest problem I had was that 90 percent of what he put in his mods and guides threads were simply things that he had taken from older posts on PA! and that had been done by other modders previously. I told him that I had a problem with him not attributing credit to those modders like Buho and Jonesie or me or Officerpuppy when it was us that had made those mods and guides originally.
He didn’t seem to be interested in giving credit and simply announced to everyone that he was going to leave PA! to follow other interests. I felt a little betrayed and very disappointed in that I thought he would be in my camp as he was also a former Army officer. Brotherhood, loyalty to brothers and all of that business you know… oh well…
So I just wanted to mention all of that. Also, he has not been our friend over on the TEHO Steam forums I can tell you. In fact I just had an argument with him a few days ago that pissed me off so badly that I unfriended him on STEAM. https://steamcommunity.com/app/223330/discussions/1/1693785669868293842/
In fact my comments about the USS Constitution in the first post I made in this thread were aimed straight at him.
EDIT: *** OH YEAH, also I MUST mention that that guide that he wrote on quest functionality and work arounds for quests in ERAS is completely out of date and should not even be considered at all now. All of that information is no longer valid or accurate as all of those old bugs he mentions in that guide and their workarounds are a moot point now – WHY??? – because all of those bugs are now fixed and gone. So if you list that link you should just put a little CAVEAT in there that there is some really inaccurate and OBE information there. MK
February 7, 2018 at 7:39 am #5948
Thanks “moderknight1” for all the valuable resources. I am not sure I’ll find the time to get into this, but I am curious to understand what it means to bring mods into the game. I really enjoy ERAS with all the characters and ships and enhancements (latest gun sound, cooool), but I miss a bit of little quests and events, that bring a bit of salt into the sandbox soup :)) . I have some ideas in my head and would find it unfair to just sit here and post what I want. I like to understand what it means to bring something into the game. So thanks again for the links.
February 14, 2018 at 4:36 pm #6026
Is Maya 5 a must have for the export plug-in or does it work with later versions?
And if it has to be Maya 5 where can I get it? Aside from a dubious download on another site we shall not name here, I really don’t know.
Wherever I’ve asked I get a huh-what?
February 15, 2018 at 4:03 pm #6028
Someone that has actually done models for the game would be better able to answer, but my understanding is that the plug-in that will convert a Maya model to a .gm that the game can read, will not work in the later versions, so I think you do have to use version 5.
Another problem I have found (even though I don’t model, I have been curious to check it out, so installed Maya for experiment), is that the crack program will supply a key that is too long and invalid if you install on Windows 7 or above; it seems to only provide a valid key when used with WinXP or below.
There is a trick to get around this if you have Win7, and that is to use the free Windows Virtual PC and Windows XP Mode. I think that Windows XP Mode is only provided for Win7 users, though. Install Virtual PC first. Here are some links:
I also have the 5.0 version here: https://mega.nz/fm/q88W3BiL
It appears to me that Maya works in the virtual, but since I don’t model, I can’t speak about whether it is fully functional.
February 15, 2018 at 4:23 pm #6029
XP is not a problem, all I’d need is to get one of my old machines set up again and there we go.
Ah, let’s see how far I can get with that.
February 15, 2018 at 8:46 pm #6030
I’m pretty sure Maya 5 is required to run the plugins. I’ve never tested them on newer versions, but I remember reading somewhere that they won’t work.
You will likely do your modeling stuff in another program, then import everything in Maya 5 and export in GM format.
I have Windows 7 64bit, and was able to install Maya without any problem. It was some time ago, so I don’t remember exactly what I did, but I don’t remember getting errors or having to use a VM.
If you have more question on the export process, just ask.
February 15, 2018 at 9:02 pm #6031
Hmmm, I also have Win7 64 bit and it wouldn’t give me a proper key (error says too long), but it’s also possible that key is formed from some hardware facets, so it may be worth just trying to use a newer OS, see if they key works, and if not, look to try another method and/or older OS.
February 16, 2018 at 4:37 pm #6033
Went through all my hdds and stored stuff, found Maya 5 and half a gazillion of characters and several very old files from back in ’11.
Bad news, it’s the Russian version, grmbl!
February 17, 2018 at 9:37 pm #6041
I don’t think anyone has written a guide, but if you wish to try, I think the best place to start is to pick a quest that is similar to what you want to do, and find all the code it uses, trace it through and familiarize yourself with it and how it accomplishes the various quest pieces.
Most quests typically start with a dialog between another character. For instance, the Blue Bird starts with dialog with a store owner, so find Program\DIALOGS\russian\Common_Store.c and look for the Blue Bird parts. The first place is:
if (pchar.questTemp.BlueBird == “begin”……
If you choose the correct dialog option, it will then go to:
link.l1.go = “RBlueBird”;
Which is another case in a dialog, but that one is a little tricky to find, because it’s actually in Rumours\Common_rumours.c:
dialog.text = DLG_TEXT_RUM;
link.l1 = DLG_TEXT_RUM;
link.l1.go = “RBlueBird_1”;
This is where an IDE (Integrated Development Environment) comes in handy. Something like CodeBlocks (a free program on the internet), where you can create an empty project, then ‘recursively add files’ by pointing to the Programs directory of the game, adding all the *.c and *.h files, then you can do a search of the entire set of files in your new project for “RBlueBird”, which will locate it for you. Very useful.
Notice it now takes you to “RBlueBird_1”
dialog.text = DLG_TEXT_RUM;
link.l1 = DLG_TEXT_RUM;
link.l1.go = “RBlueBird_2”;
Then _3, _4, _5, _6…_12, where 12 will set some attributes, and add a quest header you see in your ship log screen:
pchar.questTemp.BlueBird = “toBermudes”;
pchar.questTemp.BlueBird.traiderId = npchar.id;
The important thing, with all quests, is those attribute string values that get set, because that is typically what is checked in various other dialogs/quest check features of the script code. If you search for “toBermudes”, you will find various places in Jackman.c, Pirates_store.c and Pirates_tavern.c dialogs.
Eventually, after so many runarounds with dialogs in this quest. Example in Pirates_tavern.c:
pchar.questTemp.BlueBird = “toPuertoPrincipe”; //Search your files for “toPuertoPrincipe”
PuertoPrincipe_Store.c case setting pchar.questTemp.BlueBird = “toSeekBermudes”, then we finally get to where things start to happen. Pirates_Shipyard.c sets a “win condition” and some characters in the cavern:
pchar.questTemp.BlueBird = “toCavern”;
pchar.quest.BlueBird_inCavern.win_condition.l1 = “locator”;
pchar.quest.BlueBird_inCavern.win_condition.l1.location = “Bermudes_Cavern”;
pchar.quest.BlueBird_inCavern.win_condition.l1.locator_group = “quest”;
pchar.quest.BlueBird_inCavern.win_condition.l1.locator = “BlueBird”;
pchar.quest.BlueBird_inCavern.function = “BlueBird_inCavern”;
The “win conditions” are checked in either quests_reactions.c or reaction_functions.c. Also, the various “conditions” types are available and checked in quests_check.c. Some conditions need specific other win_condition attributes, depending on their type, to supply things like enemy group names, locators, etc.
There can be either win conditions that are “case” checks, or functions, that will do a dynamic function call.
In this case above, it is going to do a dynamic function fall for BlueBird_inCavern, which a search of the files, will find it in reaction_functions.c:
void BlueBird_inCavern(string qName)
There it will set an attribute, then a DoQuestCheckDelay, which is simply a function that will delay a short bit (in milliseconds, then run the function specified:
void BlueBird_inCavern(string qName)
pchar.questTemp.BlueBird = “seenCarriers”;
That is the dialog you see in the Cavern of the BlueBird quest, after getting to the correct locator in the cave.
Another nice feature of something like CodeBlocks IDE, is if you want, you can search TalkSelf_Quest, find that it calls StartActorSelfDialog function, right click StartActorSelfDialog, and ask to “find implementation” and it will most often take you directly to the source code of that function, without having to do a file search.
That function will open the PC dialog, which is MainHero_dialog.c, but you could also have used a search for “seenCarriers” (that attribute value) and also find it there.
We will find it sets BlueBird_endCaveDialog, so we search that, find that function and it sets the smuggler characters…then calls BlueBird_endCaveScript…calls BlueBird_seaBattle, which sets the Blue Bird captain and ship, sets the location, sets the win_conditions and the functions each condition will call, if met.
Keep going…until you reach the end.
Hope this helps, and good luck!
You must be logged in to reply to this topic.