Code Release

More
21 years 1 month ago #5151 by Mehrunes
Replied by Mehrunes on topic Code Release
Ouch Flamineo, that looks painful.

I meant where would the urls for all the new ships be found. The section I posted earlier is from an ini file containing a list of all player-purchasable ships, in other words ships aren't pulled from ShipCreation. Mainly because I wanted to be able to set base prices and minimum standings instead of relying on an algorithm and to have easy access to the html files for each ship (since there's no direct link between a ship and it's encyclopedia entry). Although I suppose that if Flamineo's loadout code will be able to turn any ship into a player-pilotable one then the ships for sale list can be populated from the ship creation functions.

Please Log in or Create an account to join the conversation.

More
21 years 1 month ago #5153 by GrandpaTrout
Replied by GrandpaTrout on topic Code Release
None of the rebalanced ships are released yet. Topics still rage hotly in the loadout thread. I expect Shane will begin to trickle them out this month. They use player system. Unless someone knows something I do not, the player can fly them all.

We could set a standard for ship html files, so they will always be in a known location. Relative to the ship ini file.

so ini:\ships\emerald\fighter would be html:\html\ships\emerald\fighter.

My reason for suggesting ShipCreation, is that the screen would work without change when dropped into a Buda5 world, or if someone does an original Iwar 1 style mod.

Once the ship creation files are edited to match the mod, zoom, off and running. I have a near earth star list. It would be cool if someone pulled 100 stars from there, and computer generated the planets. Fed them into the geography convertor, and ta da - instant I war 1 universe. I have tested loading 100 systems. 500 fails. But that should be enough exploration for anyone.

-Gtrout

Please Log in or Create an account to join the conversation.

More
21 years 1 month ago #5160 by Flamineo
Replied by Flamineo on topic Code Release

originally posted by Mehrunes
Ouch Flamineo, that looks painful.

It's less evil than it looks and, more to the point, isn't really intended for human consumption anyway -- the headaches arise from having to test it until I trust it enough to forget about it.

originally posted by GrandpaTrout
I was going to create an Ini file that mapped from each ST_Type and faction into the actual ships. Then as Shane edits the file to add new ships, they show up auto-magically in game.

That's a dashed cunning plan. A minor 'what-if', though: if I'm understanding you, this limits us to one answer per ship type/faction key. Might there be situations where we want to return a set of possible answers (particularly for the 'All' types, but also if, say, a particular faction uses more than one light fighter)? Or is your idea to map to a sensible default in all cases, so the relationship stays one-to-one?

Few quick questions on save/restore details:

-Are we restoring orientation, or only position?
-Do you want me to restore velocity, or leave it with you? I think it should restore correctly just by recovering the 'velocity' vector property, so I'll be restoring it by default unless you'd rather I didn't.
-Do you have any custom properties you want added to the save/restore lists? I could, for instance, add 'i:EpicFleetIdNum' to the icShip class (not that there'd be much point, since you're already restoring that one, but you see what I mean).
-I'm currently assuming that a saved loadout will always be restored; are there circumstances where this might not be so? If so, we'll need to make sure I know when to delete globals to prevent cluttering up save files with obsolete data.
-Are we restoring dock status (for T-Fighters, loaded freighters, etc)?

Please Log in or Create an account to join the conversation.

More
21 years 1 month ago #5165 by GrandpaTrout
Replied by GrandpaTrout on topic Code Release
I am not restoring orientation, or velocity. I would rather leave those up to the ship fleet handlers - who might want those ships in formation. Or the save might have happened during LDS. I would rather give the AI time to realize it has just been recreated, and start things to its own satisfaction.

Not ideal. But a save anywhere that mostly works will need to be good enough until PS sees the light and hands over the source :)

I am only restoring docking between ship and station, and cargo and ship. We do need to talk about fighters.

If they dock internally, you cannot really change the loadout for each. When they launch from magazine they will have a default loadout. Perhaps this is best. We make the fighter class not have a loadout ability?

Otherwise, we will need to keep them outside. I don't want to invent a whole new save/restore system just for them.

Might there be situations where we want to return a set of possible answers (particularly for the 'All' types, but also if, say, a particular faction uses more than one light fighter)?

My idea was to return a random ship from the list of possible ones for that class. I can add a function to return the whole list. And that is most likely better for ship sales, etc. Unless you want the list to change with each visit.

We don't have the ability to seed random numbers. So if the values are not remembered, they are going to change.

-Gtrout

Please Log in or Create an account to join the conversation.

More
21 years 1 month ago #5169 by MajorTom
Replied by MajorTom on topic Code Release

Originally posted by GrandpaTrout


I am only restoring docking between ship and station, and cargo and ship.

-Gtrout


Have you found an "easy" way to find out which cargo is docked to a specific ship?

note: My problem may be primarily MP specific but I'm not too happy about goofing around with globals and groups and global names for global groups (jumping back and forth between the server and client) just because iSim.IsDockedTo (...) wants to know both sims names before it returns something.

EOC/IWar2 Multiplayer Fansite

Please Log in or Create an account to join the conversation.

More
21 years 1 month ago #5171 by Flamineo
Replied by Flamineo on topic Code Release
I'm not sure orientation would be that hard: since Haarg's original LocateBySim gives a vector relative to current orientation, as opposed to world orientation, couldn't you get the vector to your reference point from the sim you're saving (relative to the sim's orientation), replace the sim by reversing the vector, then point the sim towards the reference point? Just a thought -- I agree that it shouldn't matter much.

I'll keep velocity out of the restore function; the fact it doesn't seem possible to turn LDS on from pog makes it a fairly pointless restore, anyway -- the AI will always re-activate LDS, resetting its speed to 1km/s. Could open up annoying exploits in pursuit scenarios, but that can't be helped.

Re-docking might be safer via an arbitrary-length list of other Epic Fleet IDs to which the current ID is docked -- otherwise, saving and restoring in a scenario where ships are docked to each other for repairs, resupply, towing, etc, might cause breakage. I don't know if there's any way to be sure of restoring docked relationships to the right ports, though.

Why do we need save-anywhere, again? :D

Hangar-launching fighters wouldn't be that much of a leap from the existing system: if you export EpicFleet's ID fountain, the script that handles launching/re-docking could request unique IDs for its fighters, and make its own save/restore loadout+damage calls when fighters dock/launch. That said, I do think just making them dock-on would be tidier, if only for speed reasons (I'll optimise where possible if we see slow-downs, but nothing I can do is going to make loadout+damage save/restore fast enough to be insignificant, just because of the volume of data). I don't think excluding them from the system altogether would work too well: I'd be quite happy to see them with no loadout configuration options, but the loadout save/restore functions also save ammo, RU, hit point and damage state information; I suppose you could claim that all carriers have extensive on-board repair and re-arming facilities, but I think that's a bit of a stretch.

originally posted by MajorTom
Have you found an "easy" way to find out which cargo is docked to a specific ship?

Easy may not be quite the word, but you could do, for instance, iSim.SimsInRadius(possible_cargo_carrier, 0.5km, T_CargoPod), then iterate through it checking IsDockedTo(possible_cargo_carrier, cargo_pod) for each element.

Please Log in or Create an account to join the conversation.