Shiparch, RTCShiparch and Unmoded Players
-
Previously, about 2-4 years ago I tried adding additional ships to shiparch and having them interact with players that were not modded. The additional ships appeared as the visuals they would have in rtc shiparch. But, they were invincible to unmodded players and they also seemed to cause the npc’s to fly the wrong ships and to behave oddly. The ships I added were just copies of the existing ships in freelancer that matched the ship in rtc shiparch with the exception of the depot which I used the patriots shiparch file for. I simply changed the nickname(it’s possible I need to change something else and I forgot it’s been months since I actively modded)
I was trying it again yesterday but I got completely different results. The npc’s did not seem to go crazy but, no matter how few or many ships I added I ctd’d on contact. I added 47 ships, 46 ships , and 1 ship.
I was wondering if anyone knows off the top of their head how unmodded’s and additional shiparch (I’m also curious about additional solararch entries) behave?
Is the npc going crazy a random factor or a constant or did I screw my code up in the past/am I screwing it up now?
I’ll be doing more testing but as the person I normally test with is on a business trip and my laptop takes 10 minutes to start fl it’s slow going so I figured I’d ask here
Thanks for looking,
Chess.
Update: Upon further thinking I decided to remove the collision groups and the simple that I had copied upon doing so the crashes stopped. I haven’t been able to reproduce the crazy ai yet tho.
-
The mod I made years ago and I sadly cannot recall the edits.
The current mod I made adds 1 entry to the shiparch that is a copy of the rhino.
It edits shiparch.ini, goods.ini , and market_ships.ini
The moded player can fly thier rhino clone around around an unmodded player with no crash. The unmodded player cannot touch the rhino and it visually sees a rhino as that is the first ship in rtcshiparch.
The last time I did this for some reason the npc’s became confused and npcs randomly turned into trains I never figured out what caused it and sadly I lack the code to check. I was wondering if it was known issue.
-
The server creates a “short” id for archetypes, which is simply the index when it’s created. If the client has different files, it will have different indices, so when the server sends the short id, the client will have a different “large” id for the same index. (You can see when the short id is used by having a look at Packets.)
-
Sorry, for the horrible response delay. Thanks for the reply adoxa btw heard tons about you.
I’ll have to play with the packet program some more. As FL Server became a bit unstable while it was in use. But that might be caused by other stuff I’ve done lately.
So, the server sends a short to the client the client then based on the short relates it to an entry. Is my assumption that the entry goes from RTC Shiparch if the entry number is not in shiparch correct or a coincidence and, is the randomly improper ship something that only would occur at certain times or all the time?
-
Probably just a coincidence. If you look at freelancer.ini, you’ll see shiparch.ini is loaded first, followed by rtc_shiparch.ini. Assuming you added your ship to the end of shiparch.ini, that will shift all the rtc entries by one, so in unmodded files your new ship will be the first entry in rtc. What you might be able to do is add your ships to a new file and add that file to freelancer.ini after rtc_shiparch.
-
Oh alright thanks I’ll have to try that