[Mod] System Log

Post about your finished mods here.
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

I've added some new features to the captains log:

1. a list of active stations in a system (and a counter), both friendly and enemy, distinguished by their order in the display and by color. It will also show you what x colony is good for, by adding flags to the name, including but not limited to: " - mining" " - medical" " - research"(teratons), etc.

If you see any stations that should be given a flag or whose plural form is wrong let me know so I can add the exception.

2. it will also log the type of system. As of now the following system types are logged: binary, nebular, volcanic, rocky, ice ring, desert, dwarf, and standard (the default is standard).


3. a "loading" screen, for that split second before the canvas is updated

The data for is gathered independently from system log, mostly because I couldn't figure out how to use its data. The list of stations will differ because my code checks if a station is known, not reconned.

Image
full size


find it here.


All that's really left is combining the two mods
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

That looks fabulous Bobby.

If there is anything I can do to make it easier to work with the data, let me know.

At the moment I am travelling (and will be for some time) so I can't really put much effort into it, but I will see what I can do. Ultimately I would like to deprecate the system log and just tell people to download the captains log
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

I don't think I can merge the data sets, but I can migrate all the code to a single event station and at least try to get the dockscreens working together.

EDIT: my first attempt at joining the screens resulted is a total lack of data for the system log portions, because I deleted the station used for storing data... I'm starting to make some progress.
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

I got the dockscreens to work together, the prototype is here. Please note that some things were deleted so old saves won't work.

Is that what you had in mind alterecco?

The new arrangment feels more fragile, while putting the two together I managed to break both of them a few times, and I have no idea how some of the problems got fixed, or what went wrong in the first place, but is seems to work now.

Two problems
1. the "more data" option in the event viewer works ok, but the screens don't return to it, they go to the other screens that launch them. I'll fix that before final release.
2. the next and previous options inside system details don't work with the arrows, the list does instead.


EDIT: I am converting captain's log to use a list to store data more like system log (the more I look, the more I understand it). This way I can change the display related code and retro-actively adjust how data for all logged systems are displayed without flying back through all of them again, which gets very annoying very quickly, too bad I didn't do this sooner.

EDIT2: the station list and system type are now figured out at time of display from data stored earlier. The link above is outdated.

I noticed that the inventory of stations in the system log was not being deleted once I bought the item (on an ice farm specifically, which showed it still had its goods but it was actually empty because I bought it all), so I copied and modifed the station update function to update all the station's inventories on gate out or before display, problem solved.

I am also seeing a lot of destroyed stations in the station list, is this intended or did I break something?

EDIT3: It seems like the player ship is being un-registered for events when leaving the system (breaking the onObjDocked event), I've added a check so the player is re-registered when returning to the system.

This is most likely the reason for inventory not updating from edit 2, but I will leave the new code in because the inventory should be updated after the player leaves the station, not just when he/she docks as it is liable to change.


EDIT4: As a result of edits 1 and 2 adding a filter so it doesn't show the defense turrets and satellites on the main screen turned out to be completely painless.
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

The latest version is here.

more new stuff:

1. you can now filter the captain's log's station list to only show stations with what you typed in its name.

2. the station list has a "find item" option that lets you search that system for an item by name. See this screenshot in which I typed "cannon".

3. more data for the item display, level, mass, tag. (ie: military) The unid is also logged, but not used.

4. objGetSellPrice fails on black market stations and commonwealth fortresses, I added a check to bypass this so those station's inventory will still be logged, but price will be labeled as "not available" for those stations and it may display some items which are not for sale.




5. code-wise the syslog/update-station function is modified and moved to "Captain's log.xml", if a station is not specified it will update all stations, if a station is specified it will add it.

6. minor changes to the captain's log's various display functions


There might be something I forgot as well.
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

This all sounds awesome Bobby. I am sorry that I have not been of more help in this... I hope to be able to look more into it when i get home from traveling. Do you think the system log can be deprecated, or do they still work independently?
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

Most likely. They are slowly coming together. My version of sysLog is heavily dependent on the captain's log, including for much of its data (at least partially), and the captain's log would crash without it, so they are essentially the same mod covering two unid ranges and code styles.

system list: depricated
station list: from the captain's log
item list: uses a function in the captain's log's xml
event log: almost totally intact, I hope to add more events, but don't have any ideas.

And the link above is obsolete again... but not by too much (functionally speaking).

EDIT: The system log will no longer show defense tower type stations, it will also only show stations that have an inventory.

EDIT2: I found out why objGetSellPrice won't work on the black markets and commonwealth fortresses (or ringers, teratons, and taikon), and have implemented a proper solution.

The station list is now maintained rather than re-created from scratch every time. New stations are added to it, and destroyed ones are removed. The order of the stations should be more stable now.

This warrants a re-upload, latest version here.

EDIT: the station and item lists are sorted now, the link is outdated again.

EDIT2: the station list is reverted back to the "rebuild it from scratch" model because it's more reliable that way, and being sorted anyway.
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

Updated again, now items that you have logged, and since identified, will be identified (and searchable) in past logs. They will be marked with an asterisk since only the name will be accurate. (this is still somewhat experimental and won't work for systems logged in previous versions of the mod)

Items can be searched on the main display too, now with the generic "find" option.

The item search is more persistent. Set the filter once and it will stay in effect until the screen is closed, as opposed to typing it again in each system.


EDIT: the main display screen is more responsive, (no lag on the canvas) new link is here.
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

Uploaded again: download

1. minor bug fixes
2. a map marker feature, so the user can mark a point on the map (it will show up in the station list too, and can be docked with and deleted). It should be good for marking wrecks or caches.


The two mods already depend on each other, should I put them in the same xml?
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Yes, I think that would make a lot of sense. Make it one download instead of two. Let me know when you have done it, then I will write a note on the System Log or delete it entirely
Bobby
Militia Captain
Militia Captain
Posts: 675
Joined: Wed Jul 25, 2007 7:39 pm

I updated the Captain's log on Xelerus. I also added a target memorization feature much like the signature memorizer (but built independently). Is the target log overpowered? I considered making it only log stations unless the player has a quantum cpu, but haven't.

EDIT: added a "locate" to the station log to give the player an arrow to the station.
User avatar
alterecco
Fleet Officer
Fleet Officer
Posts: 1658
Joined: Wed Jan 14, 2009 3:08 am
Location: Previously enslaved by the Iocrym

Excellent Bobby, I really look forward to trying it.
I will update the description of the system log
Post Reply