Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record the equipment of every ship #85

Closed
XVs32 opened this issue Jan 14, 2024 · 7 comments · Fixed by #92
Closed

Record the equipment of every ship #85

XVs32 opened this issue Jan 14, 2024 · 7 comments · Fixed by #92
Assignees
Labels
enhancement New feature or request

Comments

@XVs32
Copy link
Owner

XVs32 commented Jan 14, 2024

What

How

  • Check how KC3 achieved this, then copy the concept

Result

Reference

  • url, pdf, ppt etc.
@XVs32 XVs32 added the enhancement New feature or request label Jan 14, 2024
@XVs32 XVs32 self-assigned this Jan 14, 2024
@XVs32
Copy link
Owner Author

XVs32 commented Jan 20, 2024

The info in ship module is more like stable info (ex. id, max_hp, max ammo, max fuel)

For the equipment, I would want to setup a new equipment module
since it is more dynamic, and it does not have to be bind in ship module

@XVs32
Copy link
Owner Author

XVs32 commented Jan 20, 2024

Getting the equipment id on each ship is easy, those data are there in port api already, all I have to do is using it

@XVs32
Copy link
Owner Author

XVs32 commented Jan 20, 2024

I might not open a new folder for equipment, the equipment module can stay under ship folder (but not inside ship module)

@XVs32
Copy link
Owner Author

XVs32 commented Jan 20, 2024

Next I will have to find the pure equipment list, and the order of the equipment in the list

equipment list could be found in require_info/api_slot_item
Two issues here:

  1. This does not provide the order of equipment in equipment list
  2. This api only get sent on start up (from splash screen)

@XVs32
Copy link
Owner Author

XVs32 commented Jan 20, 2024

  1. This does not provide the order of equipment in equipment list

The equipment list contains

  • api_slotitem_id <= the equipment type id, same equipment could have the same id
  • api_id <= the equipment id, every single equipment has it's own id

With this two, I could get the order of equipment list under "全裝備" category

  1. This api only get sent on start up (from splash screen)

For Fleet reset, this is not deadly, but for future functions, I will have to track & maintain the equipment list on fly.....(Oh nooooo.....) <= gotta find a workaround

There is a api_get_member/ship3/api_slot_data gets trigger when equipment is load/unload to a ship, the good things are:

  • It gets trigger in game, no restart is needed
  • It list equipment which is not loaded already, which is easier for equipment loading module to use

@XVs32
Copy link
Owner Author

XVs32 commented Jan 20, 2024

Final decision:

  • Use port api to find the equipment currently loaded on a ship
  • Use api_get_member/ship3/api_slot_data to find equipment currently unuse
    ^
    |

This is #87 's problem though, well, whatever

@XVs32
Copy link
Owner Author

XVs32 commented Jan 20, 2024

Done, after port api is updated, equipment on ship will be recorded in equipment["loaded"]

@XVs32 XVs32 linked a pull request Jan 20, 2024 that will close this issue
@XVs32 XVs32 closed this as completed in #92 Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant