Modding How To
Private: Welcome to the Reef! › Forums › GOF Eras Module 2 download & discussion board › Modding How To
Tagged: Modding how to
- This topic has 36 replies, 9 voices, and was last updated 6 years, 7 months ago by Oldtimer.
-
AuthorPosts
-
-
February 5, 2018 at 10:09 am #5908ChristophParticipant
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 #5909MaltacusParticipant
I would want the same thing but haven’t seen one. I found some tutorials on PA here;
http://www.piratesahoy.net/forums/theblackknights-mods-and-guides.174/
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 #5912modernknight1Keymaster
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
https://www.youtube.com/watch?v=5oMXwbtMQscSo 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!
MK
- This reply was modified 6 years, 9 months ago by modernknight1.
- This reply was modified 6 years, 9 months ago by modernknight1.
- This reply was modified 6 years, 9 months ago by modernknight1.
-
February 6, 2018 at 11:04 am #5927MaltacusParticipant
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;
http://www.twcenter.net/forums/showthread.php?774091-Gentlemen-of-Fortune-Eras
Do you mind if borrow from your thorough guides? -
February 6, 2018 at 4:50 pm #5932modernknight1Keymaster
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.
MK
- This reply was modified 6 years, 9 months ago by modernknight1.
-
February 6, 2018 at 8:21 pm #5937MaltacusParticipant
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 #5938modernknight1Keymaster
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.
MK
- This reply was modified 6 years, 9 months ago by modernknight1.
- This reply was modified 6 years, 9 months ago by modernknight1.
-
February 6, 2018 at 9:26 pm #5941modernknight1Keymaster
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
MK
- This reply was modified 6 years, 9 months ago by modernknight1.
- This reply was modified 6 years, 9 months ago by modernknight1.
- This reply was modified 6 years, 9 months ago by modernknight1.
- This reply was modified 6 years, 9 months ago by modernknight1.
-
February 7, 2018 at 7:39 am #5948ChristophParticipant
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 #6026Jolie RougeParticipant
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 #6028JeffreyKeymaster
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:
https://www.microsoft.com/en-us/download/details.aspx?id=3702
https://www.microsoft.com/en-us/download/details.aspx?id=8002
https://www.bleepingcomputer.com/tutorials/use-windows-xp-mode-in-windows-7/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 #6029Jolie RougeParticipant
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 #6030OrazioModerator
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 #6031JeffreyKeymaster
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 #6033Jolie RougeParticipant
Arrr, treasure!
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 #6041JeffreyKeymaster
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:
case “business”:
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:
case “RBlueBird”:
dialog.text = DLG_TEXT_RUM[223];
link.l1 = DLG_TEXT_RUM[224];
link.l1.go = “RBlueBird_1”;
break;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”
case “RBlueBird_1”:
dialog.text = DLG_TEXT_RUM[225];
link.l1 = DLG_TEXT_RUM[226];
link.l1.go = “RBlueBird_2”;
break;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:
AddQuestRecord(“Xebeca_BlueBird”, “3”);
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”;
DoQuestCheckDelay(“TalkSelf_Quest”, 0.2);
}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!
-
April 1, 2018 at 9:45 am #6131OldtimerParticipant
DELEVELING
Hi all,
could some kind soul point me to where and how to delevel items and ships. So that everything shows up everywhere from day 1.
IIRC correctly in the TES series you only needed to change one digit for every item description, to 1. Time consuming but easy.
I see no reason for items useful at lvl 1 showing up later in game when they are no longer viable. And many are very beatiful.
Or perhaps it`s possible to make a general override for this? That might be too difficult for me to do.
Rgds, Oldtimer
-
April 4, 2018 at 2:00 am #6137SchiavonnaParticipant
Wordpress blows dead rats in hell!
Its just gobbled my response to above. So Im going to post it again. But probably/maybe/most definately in 4-16 hours the original will sudenly appear and make me look like a right double posting thickie!
Bah!
Reprint following this – no apologies for typos, bad spacing, etc – BLAME Turdpress for that!
-
April 4, 2018 at 2:03 am #6138SchiavonnaParticipant
BACK UP ANY FILE BEFORE YOU CHANGE IT – OR YOU WILL REGRET IT!
Good tips: get notepad ++ (not default windows notepad … its too basic)
Use a zip program to keep a clean/unmodded copy of the file(s) you are messing about with. Reason? You’ve now got a good visual indicator of whats been changed in your game folder, and can now tell in seconds/minutes (rather than HOURS/DAYS -!!! ) all files that have been altered in your complete game folder. Makes it easier for others to help if you get in a mess and you can tell them exactly what you’ve changed.
ShipsUtilites.c = for ships [full path: ERAS\Program\scripts\ShipsUtilites.c)
and
utils.c = for items [full path: ERAS\Program\scripts\utils.c)
These 2 files cover the leveling of ships in-game, ships and items respectively.
Now, you are going to need to open up ERAS\RESOURCE\INI\texts\russian\common.ini to bridge the gap in understanding what ship is what code. Way down around line 1160 (DONT QUOTE ME ON THAT!) you are going to find listed the ships name in code next to how it appears to the player in game (i.e CARAVELR = the code, “Portuguese Caravela” = name as it appears in game). This is rather important if you want to correctly identify what ship(s) you are actually changing.
ERAS\Program\Ships\Shipsinit.c also has the specific engine code for a ship, but unless you’re familiar with modding AOP2, i’d stay clear for now – as it DOESN’T give you the “in-game name” so it’s only of use to modders familiar with the games codings that can identify certain ships by there code alone.
Conversely, for modding the levels OF items, open: ERAS\Program\ITEMS\initItems.c ….AND…use it in tandem with C:\Games\ERAS 2.6.7 NEW\RESOURCE\INI\texts\russian\ItemsDescribe.txt. Same thing –
initItems.c tells you the game code, ItemsDescribe.txt will give you the item’s name as it appears in game.
Still with me?
Back to ShipsUtilites.c
FIND THIS LINE:
FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_TARTANE), “ship1”);
The lines you require are below this.
To change ALL the ships to appear at say level 2 (go with me on this – its quicker for me and easier to explain) – find the lines that look like this:
if (sti(PChar.rank) > 18)
Where the “18” in this example can be anywhere between 1-18 in the file.
Every time you see that, it’s basically saying “if the player characters’s level is GREATER THAN (level number)”, then this ship can spawn in shipwrights for sale.
So, you would then go through the rest of the page looking for those particular lines:
if (sti(PChar.rank) > whatever number)
And change them to:
if (sti(PChar.rank) > 1)
That means they spawn at Level 2.
I’ve never tried, but feel free to be my guinea pig:
if (sti(PChar.rank) = 1)
Where I’ve changed the > to a = so “players level IS EQUAL TO 1″… which should, by logic, work. But…I’d run it by Jeffrey first 😉
ITEMS?:
Open ERAS\Program\scripts\ShipsUtilites.c
Look for lines such as this:
if (irand == 1 && makeint(pchar.rank) >=5) {TakeNItems(ch,”blade56″, 1);}
So that line is indicating BLADE56 (WTF is blade 56? Yeah…thats where the other files I listed to have open come in as a reference to what gamecode corresponds to what item’s name (as you know it ‘in-game’….okay?)
So AGAIN:
if (irand == 1 && makeint(pchar.rank) >=5) {TakeNItems(ch,”blade56”, 1);}
IS TELLING YOU: when player characters level is GREATER THAN or EQUAL to 5 means blade 56 spawns at traders at level 5.
If you are wanting to set them ALL to appear at level 1, again you have to work your way down through that code, changing each
(pchar.rank) >= whatever number
to
(pchar.rank) >= 1)
Then they should appear in game from whatever level you assigned. I say “SHOULD”, but your bitching state of the art laptop/desktop will probably start smoking and then catch fire at the sheer volume of data unleashed when you now open the buy ships/traders interface. Maybe you’ll be lucky and it will just chug a bit. Keep a fire extinguisher handy just in case 😉
Seriously, try not to overwhelm the game or your system by making too radical a change as having hundreds of ships and items spawn at once will test the limits of both. Recommend trying small changes at first to get the hang of what you are doing.
Jolly good luck old bean!
-
April 4, 2018 at 7:00 am #6139OldtimerParticipant
-
April 4, 2018 at 7:39 pm #6140SchiavonnaParticipant
You’re more than welcome. Sorry if it comes across a little intimidating regarding adding many items. It will be like the first time you try to open the interface when you first install ERAS. You re more likely to experience “lag” than an exploding CPU – LOL! The “lost edit” that strangley dissappeared after editing put it alot more succinctly and easier on the eye. Any questions at all – just post them up or PM me if you prefer.
AoP2/ERAS is different from Elder scrolls ( I hope thats what you mean by “TES”) in that there is no grand “software kit” that lets you do a multitude of things, but in way it’s easier because so much can be done with just using basic notepad on your PC.
Try the items first – working your way down the list in ShipsUtilites.c, have a go at changing 10 or 20 or so items near the top end, set them to appear at level 1 as explained, and check out how it plays out in game. Will take only a few minutes and it’ll give you a little encouragement when you see your changes in the game.
TEST it with a NEW GAME if it doesnt show in your current playthrough. Some files need to “re-initialise” at game start before changes are seen. Jeffrey has made more and more of these files NOT dependant on a REINIT, so there’s a good chance it might NOT need this and you can see alterations straight away in your current game. Honestly can’t remember if ShipsUtilites.c needs one or not – ? Therfore plan B if nothing appears to change after modding: try a ‘New Game’ start.
Hope that helps
-
April 5, 2018 at 9:07 am #6143OldtimerParticipant
I tried this for ships: if (sti(PChar.rank) = 1). Got message “can`t initialize program” at start.
How abt. changing it to this: if (sti(PChar.rank) >= 1)?
BTW, tested the “unrealistic” i e COAS default ship presence at wharfs on a lvl 1 char and saw some never seen before but none higher then lvl 5.
Rgds, Oldtimer
-
April 5, 2018 at 2:05 pm #6144SchiavonnaParticipant
I think you’re on the right track with: if (sti(PChar.rank) >= 1)
I wasn’t sure about just putting an ” = ” – Jeffrey can explain the logic far more articulately than myself.
IF you try substituting the ” >= ” command AND YOU STILL RECEIVE a “can’t initialise program” message, then fall back on ” > ” i.e. the GREATER THAN symbol, which definately works. Unfortunately you will not see any changes till your PC reaches level 2 rank. I don’t recommend setting it to “if (sti(PChar.rank) > 0)”, the game won’t recognise level 0.
If you want certain ships to spawn – whether 7th Rate through to 1st rate, you have to work through the code and substitute the ship’s coded name, which is in brackets near the end of each particular line, with your new choice. I’m using an earlier build of eras – it might be different to what you have, so don’t just copy/paste – use it as an example:
if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_WAR_TARTANE), “ship2”);
The (SHIP_WAR_TARTANE) part – thats what you would replace with your new choice. Ok, so you probably figured this out already.
Using these lines as an example:
iTest_ship = rand(14); if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_WAR_TARTANE), "ship2"); if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_TARTANE2), "ship2"); if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_ArmedTartane), "ship2"); if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_KETCH), "ship2"); if (iTest_ship == 5) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_HANNAH), "ship2"); if (iTest_ship == 6) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_PequenaCaravela), "ship2"); if (iTest_ship == 7) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_Boeier), "ship2"); if (iTest_ship == 8) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_Barque3), "ship2"); if (iTest_ship == 9) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_Barque4), "ship2"); if (iTest_ship == 10) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_Caravel20s), "ship2"); if (iTest_ship == 11) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_TartaneWar), "ship2"); if (iTest_ship == 12) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_Schooner_MB), "ship2"); if (iTest_ship == 13) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_Galeon_Santiago), "ship2"); if (iTest_ship == 14) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_BarcoCostero), "ship2");
Ok – all those lines are going to spawn ONLY ONE ship in the shipyards. You see the “iTest_ship = rand(14);” line? Thats’s saying there are 14 possibilities of what will be spawned – but only ONE ship will be spawned. 100 divided by 14 = 7.14 (rounded up). There is 7.14 % of that particular ship being spawned.
You could fill all the ship entries with one specific ship – all 14 entries and that would guarantee it appearing in-game. OR you could reset the random number – change it to 4 for example – for the sake of simplicity. BUT YOU WOULD THEN NEED TO MAKE SURE THERE IS ONLY 4 LINES OF CODE THAT NOW FOLLOW, NOT 14…otherwise your game won’t start. SEE EXAMPLE BELOW
Let’s say you want the “Holland Frigate” to appear in the shipyards. Checking through the common.ini file for “Holland Frigate” – you’ll find it’s listed as “HollandFrigate”. That’s not the code you want, but that will give you a listing for Ships_init.c. Opening up Ships_init.c and looking for “HollandFrigate”, we find that the coded name for it is “SHIP_HOLLANDFRIGATE”. THATS WHAT YOU WANT FOR For this to work. You can sometimes bypass looking up common.ini, and you can work out the ship’s codename directly from ships.init. If you can’t find it/ work it out from Ships_init.c, then default to common.ini first.
If we were to do my example from the paragraph above, the code would have to be re-written as such:
iTest_ship = rand(4); if (iTest_ship == 1) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_HOLLANDFRIGATE), "ship2"); if (iTest_ship == 2) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_HOLLANDFRIGATE), "ship2"); if (iTest_ship == 3) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_HOLLANDFRIGATE), "ship2"); if (iTest_ship == 4) FillShipParamShipyard(NPChar, GenerateStoreShip(SHIP_HOLLANDFRIGATE), "ship2");
And that would replace the original 14 lines (or 15 if you include the line “iTest_ship = rand(4);”).
Be careful copy/pasting stuff. Proof read it for silly little errors/spacing. etc. Otherwise it will lead to the error message on game start.
So, work out the ships you want to see spawned early game in the shipyards, work out their coded names from the other files, and substitute them with the ships you dont want.
You’ll notice in ShipsUtilities.c where it’s written ” = If Realistic SHIP PURCHASE IS enabled” AND ” = If Realistic SHIP PURCHASE is NOT enabled”, that’s telling you that the code clusters directly following are dependant on “realistic ship purchase” being switched ON or OFF in your SETTINGS. So, depending on which setting you prefer, you can skip the other and half the work you’re doing.
Its maybe a bit more complex than you thought? And a little laborious to see significant changes appear in game, but YOU HAVE BACKED UP YOUR FILES SAFELY….so you’ve got nothing to lose. And it’s quite rewarding when you figure it out nd it works.
-
April 5, 2018 at 3:19 pm #6148JeffreyKeymaster
The scripting language used in the game is similar syntax to C/C++. If you use just one = sign, it will try to assign the value on the right side to a variable on the left side. Example:
x = 1; //This assigns the value 1 to to variable x.
So when you try if(sti(PChar.rank) = 1), it is not really testing for equality, it is trying to assign the value 1 to the sti() function, which is impossible and creates an error. To test for equality, one must put two == signs, like so: if(sti(PChar.rank) == 1).
Inequalities always work, because there is no variable assignment that can happen with those symbols…it is only the = sign that is a little tricky because it serves two purposes. One will assign values, two will test equality.
-
April 5, 2018 at 4:49 pm #6149OldtimerParticipant
Mr. Jeffrey,
THX awfully, I used == 1 and it works! A lvl 1 char sees lvl 4 ships at a wharf!
Now perhaps it was unnecessary work. If Mr. Knight levels shipyards according to city size/importance as he wrote, there will be, IMO, no need to bind ship lvl to player lvl.
Player at low lvl will not be able to buy a three-decker unless he finds some 700K gold caches day one AND nav officers/instruments enabling him to sail that monster.
IF, I repeat IF he does, then he deserves to sail said three-decker, without penalties.Rgds, Oldtimer
-
April 6, 2018 at 3:02 pm #6154SchiavonnaParticipant
@ Jeffrey: I new all that – honest!
Nah, I didn’t. Thank you Jeffrey for explaining so concisely and eloquently for dummies like me. -
April 7, 2018 at 8:59 am #6159OldtimerParticipant
Mr. Jeffrey,
after playing a couple of months game time with unleveled ships I noticed that there is much less ships(max 4) to buy at the wharfs and not better than lvl 5.
I tried entering same wharf a lot of times but never got anything higher than lvl 5 to spawn.
Any thoughts on the possible reason for that?Rgds, Oldtimer
-
-
-
April 5, 2018 at 2:29 pm #6147SchiavonnaParticipant
And again…another post gets lost in edit.
Take two:
HERE:
Merchant Lugger: SHIP_LUGGERVML Cornish Lugger: SHIP_LUGGER Petite Lugger: SHIP_PINK Heavy Lugger: SHIP_LUGGER_H Armed French Lugger: SHIP_ChasseMaree Bermuda Sloop: SHIP_BERMSLOOP Sloop: SHIP_SLOOP Veinhard sloop: SHIP_VEINARD Mediterranean Brigantine: SHIP_SHNYAVA English Snow: SHIP_INTERCEPTOR Valciria Armed Snow: SHIP_Valciria Corsair Chebec: SHIP_CorsairChebec Heavy Dutch Brigantine: SHIP_CASTELF Dutch Fluyt: SHIP_DutchFluyt Corsair Corvette: SHIP_BATTLECORVETTE English Pinnace: SHIP_EnglishPinnace English Fast Pinnace: SHIP_BERLIN14gun Heavy Dutch Pinas: SHIP_PINNACE Galleon: SHIP_GALEON_L Early Spanish Galeon: SHIP_GALEON_SANTIAGO Old Argosy Bark: SHIP_HIND_L GeleideFrigat: SHIP_PINNACEBERLIN OorlogsFrigat: SHIP_Debrackw Privateer Sloop: SHIP_NEPTUNUS Flemish Privateer: SHIP_NEPTUNUS2 Corsair Fast Sloop: SHIP_NEPTUNUS3 Armed Spanish Patache: SHIP_CARAVEL Armed Urca: SHIP_CARAVEL2 Sixth Rate: SHIP_Fregates_Legeres French Scout Frigatte: SHIP_FRIGATE_L English 5th Rate: SHIP_UNICORN Flota Galleon: SHIP_SANFELIPE Spanish Fast Galleon: SHIP_GALEON_H21 Armed English Trader: SHIP_THEBLACKPEARL Jamaican Patrol Ship: SHIP_JAMAICASHIP Frigatta Olandesa: SHIP_FRIGATE_MB Galeon Legero: SHIP_FASTGALLEON1 Export Warship: SHIP_FWZP56M Flemish Galleon: SHIP_FlemishGalleon Old English Galleon: SHIP_REVENGE Dutch Frigate: SHIP_DUTCHFRIGATE French Cinquante Tireur: SHIP_FrenchFifty French Navire de Guerre: SHIP_LINESHIP5 Dutch Zestig Gunner: SHIP_LINESHIP Derderangs Oorlogsschip: SHIP_DUTCHLINESHIP2 Old Dutch Manowar: SHIP_DUTCHSHIP Ordere Seconde: SHIP_POSEIDON Almirante Galeon: SHIP_NEPTUNE
Made it a little easier for you! I recommend ignoring what I said about writing new code (playing with the ‘random’ variable – and shortening the lines from the originals) and just go ahead and substitute some of the ships above with whats already in there in ShipsUtilities.c. Work your way down to the FIRST “= If Realistic SHIP PURCHASE is NOT enabled”, replacing what ship you’d like to see. YOU CAN DO MULTIPLE ENTRIES OF THE SAME SHIP. It wont crash the engine, just increase the chances of the that ship spawning at Shipyards.
That’s your homework sorted, eh? 😛
-
April 5, 2018 at 5:05 pm #6150OldtimerParticipant
Schiavonna,
THX awfully for your help, really appreciated. I`m not interested in having guaranteed spawns though. I only want a random chance for any ship to spawn anywhere at anytime irrespectively of player lvl. Which I think I´ve done, thx to you and Mr. Jeffrey.
I`d like to unlevel weapons now. BTW, I did a little test of your anims as Miss B. Devlin. It looks like she has more variety in fencing moves than vanilla Mrs. M. Harvey or Mlle. J. Delahaye. Also she is insanely fast even with medium sword on Power 5. At least as fast with that as the other two with really light weapons(dog-heads).
Rgds, Oldtimer
- This reply was modified 6 years, 7 months ago by Oldtimer.
-
-
April 6, 2018 at 3:05 pm #6155SchiavonnaParticipant
@ Oldtimer
We’ll that’s kind of wierd! I realised yesterday that I uploaded the wrong files to Jeffrey (- sorry Chief!) and I think they were the default ERAS ones, from the 2.6.7 build. I’ve just checked with winmerge and the Beatrice Devlin animation was an earlier modded version, but with very little done to it. NO modifications were done to any of the fighting/slashing/thrusting animations, or weapon drawing, running or sidesteps. Only to the Idle anims. So I think your beef is with the default files.
Beatrice Devlin uses the Beatrice_AB.ani file, which was the one I worked on most. The main objective was to balance out the idle animations, because one idle animation was dominating the others and over-playing (wrist-scratching)…due to bad/rushed configuration tht goes back to vanilla AoP2. Beyond that I have been gently tweaking, as opposed to a full-on make-over, and only really worked on less than 5% of what typically composes an .ani file. It seems I’ve misplaced the most recent files from sept 2017 and only have ones from 2016 that only have anti-wrist scratching work done.
@Modern Knight – any chance of “turtle spleen ladies skin balm” appearing in the Items list? (- the didnt have E45 cream or hand sanitizer back in the day!) For those ladies with incredibly itchy wrists. Okay, maybe not…
PLEASE!: Could someone possibly upload some of the latest ERAS build’s animation files to mega – so I could see what’s what with the latest build? I don’t need the whole folder, just these particular files from ERAS 2.8.-\RESOURCE\animation:
Baker.ani
blood.ani
beltrop.ani
man.ani
man2.ani
man2_ab.ani
blaze.ani
beatrice_ab.ani
Jessika.ani
Jessika_ab.ani
YokoDias.ani
woman_ab.ani
woman3_ab.aniIf you think the Beatrice Devlin ani is too fast and somewhat OP, then just go and try the DEFAULT man2_ab.ani one {used by: Jan Willems/Nathaniel Hawke/Walter Kennedy/Benjamin Hornigold/Jelles de Lecat/Bartholomew Redd/Philip Ras/Don Diego de Ibarra/Daniel Montbars/Stede Bonnet/Bertrand Vallo/Alonso de Campos/John Coxon/Bartolomeu de Português…} It has quite an exploitative, lightning-quick killer-slash. Thing is…I haven’t even gone near that file yet.
Same applies for the woman3_ab.ani – used by Ann Bonney, Mary Harvey, Flora Burn, Charlotte de Berry, Morgan Adams & Anne Dieuleveut. Ridiculously fast and I have never tried modding it.
-
April 7, 2018 at 8:42 am #6157OldtimerParticipant
Hi,
actually I think that Miss Devlin and all other playable chars are UP by a large margin when doing questlines. As long as questline melèe remains as bungled as it was by original devs yet more OP-ing player chars is the only “fair” solution for those doing said quests.
In ordinary combat player would become godlike but there perhaps the opponents could be powered up for the challenge to remain.As Mr. Jeffrey explained to me reworking questline melèe would be very time-consuming. More time-consuming than adding options(more or less new questlines) for non-violent solutions to some quests? Just asking…
Rgds, Oldtimer
- This reply was modified 6 years, 7 months ago by Oldtimer.
-
April 8, 2018 at 6:18 pm #6174SchiavonnaParticipant
@ Oldtimer
Ah, ok – I hear what you’re saying. Some ‘exploits’ are appreciated considering the Questline imbalance. I should really ask Jeffrey to mark those files as “Experimental” to avoid any misconceptions in the future. Appreciate the feedback though – and I will be needing more in near future in regards to some user mods I’m hoping to put up here. It would be nice to get feedback before they “go live” and I get lynch parties sent out for me – if you are available and willing – ? 🙂
-
-
April 8, 2018 at 3:39 pm #6164modernknight1Keymaster
I know that most people don’t appreciate my attempts to make this world into more of a period simulation. I am always looking to the future and what I hope this will all be a year from now or two years from now. The merchants refusing to trade was always there, but it didn’t work until Jeffrey fixed all that bad spaghetti code. I liked the “new” feature and want to expand on it as we have larger towns with more merchants and trading licenses that have actual meaningful value and usefulness. Port controllers will become more necessary for getting the right documents stamped – especially in the Spanish towns which were always really restricting with regards to trading and fees – especially regarding foreigners.
So I also have to say that for those people who strive to make this world into a game instead of the simulation that I am striving for, you will not like the next series of changes that Jeffrey and I have planned.
Along with the new cannon mod with MANY different new sizes and capabilities available by nationality and size of colony, ships will follow the same logic. You will never see 1st thru 3rd class ships spawn for sale at a shipyard. You will predominantly see only ships of that nation and usually only class 6 or 7 spawn at most shipyards. In large colonies like Havana, Puerto Rico, Port Royal, Curacao, etc, one will find class 4 and 5 ships as well. At Pirate colonies occasionally class 4 and even a rare class 3 will be for sale captured as prizes. (you see where I am going with this)
To make all ships have an equal chance at spawning goes against years of developmental effort I have striven to bring into existence. To have class 1 and 2s spawning at shipyards with an even chance as any other I find utterly ridiculous. However, if that is the kind of game play you want – then good onya.
Same with weapons and items. Many of these things were always planned to be rare or not immediately available, so that you have to look for them and they are always such a wonderful treat and surprise when you find them. I like that very much. But if you guys like finding stuff all the time everywhere I guess that’s fine for your individual game tastes, but I very much want to stress for our other members reading this thread that while I encourage modding and mods and welcome anything you guys put together to be released in our user created mods thread so that other like minded people can enjoy them, I will NOT be making these kinds of changes in our base game releases.
MK
…back to the limb
-
April 8, 2018 at 11:06 pm #6186VincentParticipant
Can I get someone to tell me where to go to adjust prices for goods and services like brothels? I personally find some of them very high for my liking, and would like to see about adjusting them to be more in line with my own expectations.
-
April 9, 2018 at 6:46 am #6188OldtimerParticipant
@Modernknight
Mr. Knight,
ships availability and lvl according to nationality and
city size/importance is a good idea. But youre not there yet. As of today I
ve seen, or rather not seen, some lvl 6 ships for sale at new game start. Maybe lvl 7 too, don`t remember what lvl the bermuda sloop is.
I dont know if that
s because they are so rare or because they are set to spawn at a higher player lvl. First reason is OK, the other not really logical, IMO.As for weapons/items I would accept your reasoning if I have not seen the merc sword, a very beautiful weapon, first spawn in shops at player lvl 4 or 5. By that time it
s no longer a viable alternative, dam 12/40 something. It
s weaker than the cutthroat knife, freely available from day one.Having said that, I confess that I very rarely buy anything, relying on loot for my equipment. And loot seems not leveled according to item power.
But I`ve never come across the merc sword as loot for some reason.So, it`s your mod, you do not have to do anything you do not want to do. But as you want feedback, I deliver.
Rgds, Oldtimer
-
-
AuthorPosts
- You must be logged in to reply to this topic.
by Christoph