Skip to content

Commit

Permalink
Add CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
magicbear committed Feb 5, 2024
1 parent 15568b5 commit 5cbce1c
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 51 deletions.
59 changes: 59 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Changelog
=========

..
Please try to update this file in the commits that make the changes.
To make merging/rebasing easier, we don't manually break lines in here
when they are too long, so any particular change is just one line.

To make tracking easier, please add either ``closes #123`` or ``fixes #123``
to the first line of the commit message. There are more syntaxes at:
<https://blog.github.com/2013-01-22-closing-issues-via-commit-messages/>.

Note that they these tags will not actually close the issue/PR until they
are merged into the "default" branch.

v0.2.7
-------

Major:

- Update PalEdit for using GvasFile manage

Features:

- Performance improve for loading edit player item and CopyPlayer and DeletePlayer

Fixes:

- Fix Save Error on Fast load feature
- Fix pip dependenices

v0.2.5
-------

Major:

- PalEdit feature
- Player Sav file edti feature
- Reconstruction for Tk usage

Fixed:

- Non UTF-8 encode error catch

v0.2.0
-------

Major:

- Player Item Editor

v0.1.9
-------

Major:
- Player Editor


2 changes: 1 addition & 1 deletion palworld_server_toolkit/PalEdit
Submodule PalEdit updated 2 files
+27 −17 PalEdit.py
+7 −0 PalInfo.py
63 changes: 14 additions & 49 deletions palworld_server_toolkit/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ def skip_decode(
def skip_encode(
writer: FArchiveWriter, property_type: str, properties: dict[str, Any]
) -> int:
if "skip_type" not in properties:
if properties['custom_type'] in PALWORLD_CUSTOM_PROPERTIES is not None:
return PALWORLD_CUSTOM_PROPERTIES[properties["custom_type"]][1](
writer, property_type, properties
)
if property_type == "ArrayProperty":
del properties["custom_type"]
del properties["skip_type"]
Expand Down Expand Up @@ -211,7 +216,7 @@ def load_skiped_decode(wsd, skip_paths, recursive=True):
properties = wsd[skip_path]

if "skip_type" not in properties:
return
continue
print("Parsing worldSaveData.%s..." % skip_path, end="", flush=True)
t1 = time.time()
parse_skiped_item(properties, skip_path, True, recursive)
Expand Down Expand Up @@ -785,53 +790,13 @@ def createWindow(self):
return root

def load(self, file=None):
paldata = wsd['CharacterSaveParameterMap']['value']

nullmoves = []
for i in paldata:
try:
p = PalInfo.PalEntity(i)
if not str(p.owner) in self.palbox:
self.palbox[str(p.owner)] = []
self.palbox[str(p.owner)].append(p)
n = p.GetFullName()
for m in p.GetLearntMoves():
if not m in nullmoves:
if not m in PalInfo.PalAttacks:
nullmoves.append(m)
except Exception as e:
if str(e) == "This is a player character":
print("Found Player Character")
# print(f"\nDebug: Data \n{i}\n\n")
o = i['value']['RawData']['value']['object']['SaveParameter']['value']
pl = "No Name"
if "NickName" in o:
pl = o['NickName']['value']
plguid = str(i['key']['PlayerUId']['value'])
print(f"{pl} - {plguid}")
self.players[pl] = plguid
else:
self.unknown.append(i)
print(f"Error occured: {str(e)}")
# print(f"Debug: Data {i}")

print(self.palbox.keys())
self.current.set(next(iter(self.players)))
print(f"Defaulted selection to {self.current.get()}")
self.updateDisplay()
print(f"Unknown list contains {len(self.unknown)} entries")
print(f"{len(self.players)} players found:")
for i in self.players:
print(f"{i} = {self.players[i]}")
self.playerdrop['values'] = list(self.players.keys())
self.playerdrop.current(0)
nullmoves.sort()
for i in nullmoves:
print(f"{i} was not found in Attack Database")

self.refresh()
self.changetext(-1)
self.jump()
self.data = {
'gvas_file': gvas_file,
'properties': gvas_file.properties
}
paldata = self.data['properties']['worldSaveData']['value']['CharacterSaveParameterMap']['value']
self.palguidmanager = PalInfo.PalGuid(self.data)
self.loadpal(paldata)

def build_menu(self):
self.menu = tk.Menu(self.gui)
Expand Down Expand Up @@ -1252,7 +1217,7 @@ def to_storage_uuid(uuid_str):


def CopyPlayer(player_uid, new_player_uid, old_wsd, dry_run=False):
load_skiped_decode(wsd, ['ItemContainerSaveData', 'CharacterContainerSaveData'], False)
load_skiped_decode(wsd, ['ItemContainerSaveData', 'CharacterContainerSaveData'])
player_sav_file = os.path.dirname(os.path.abspath(args.filename)) + "/Players/" + player_uid.upper().replace("-",
"") + ".sav"
new_player_sav_file = os.path.dirname(
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = palworld-server-toolkit
version = 0.2.6
version = 0.2.7
author = MagicBear
author_email = [email protected]
description = A toolset for PalWorld Server
Expand Down

0 comments on commit 5cbce1c

Please sign in to comment.