pylivemaker
pylivemaker copied to clipboard
lmlsb edit: support setting values from command line flags
> I pushed some changes:
- the scenario script tag characters should be output correctly in XML mode for
lmlsb dumpnowlmlsb dumpnow has a-o/--output-fileoption so you don't have to pipe console output to a text file- there is now a very dumb and simple
lmlsb editcommand line tool that takes an LSB filename and a command line number.At the moment can only you can only edit simple numeric fields in a specific set of command types, but this should at least allow you to edit the non-japanese character spacing parameter. pylivemaker uses the actual property names to identify the command parameters and not the ARG_### values from IRL, so you will want to set the
PR_FONTCHANGEABLEDfield to 0.It will prompt you to enter a value for each editable parameter, just press enter to keep the current value.
Ex (this is using the files you sent me, where I am assuming you had already patched that field to be 0?):
py:pylivemaker ❯ lmlsb edit メッセージボックス作成.lsb 36 36: MesNew "メッセージボックス" "メッセージボックス土台" 10 10 GetProp("メッセージボックス土台", 5) - 10 - 10 GetProp("メッセージボックス土台", 6) - 10 - 10 1100 "MS ゴシック" 16 6 16777215 16711680 0 16776960 1 0 "ノベルシステム\メッセージボックス\再生中.lsc" "ノベルシステム\メッセージボックス\イベント.lsc" "ノベルシステム\メッセージボックス\右クリック時.lsc" "ノベルシステム\メッセージボックス\終了.lsc" "ノベルシステム\メッセージボックス\リンク.lsc" 1 4 0 "ノベルシステム\メッセージボックス\再生開始.lsc" "ノベルシステム\メッセージボックス\アイドル時.lsc" 0 0 0 0 1 0 Enter new value for each field (or keep existing value) Name ["メッセージボックス"]: <skipping uneditable field> PR_PARENT ["メッセージボックス土台"]: <skipping uneditable field> PR_LEFT [10]: PR_TOP [10]: PR_WIDTH [GetProp("メッセージボックス土台", 5) - 10 - 10]: <skipping uneditable field> PR_HEIGHT [GetProp("メッセージボックス土台", 6) - 10 - 10]: <skipping uneditable field> PR_ALPHA []: <skipping uneditable field> PR_PRIORITY [1100]: ... PR_TAG []: <skipping uneditable field> PR_CAPTURELINK [1]: PR_FONTCHANGEABLED [0]: 0 PR_PADDINGLEFT []: <skipping uneditable field> PR_PADDING_RIGHT []: <skipping uneditable field> Backing up original LSB. Wrote new LSB.
Thank you for the option to patch the lsb file.
Is there a way to enter the value directly via command line arguments instead of waiting for the prompt? Currently this is the only hurdle to tackle in my workflow to fully automate the translation process. Probably something like the following command would be nice:
lmlsb edit メッセージボックス作成.lsb 36 --param PR_FONTCHANGEABLED 0
Originally posted by @Quartzbell in https://github.com/pmrowla/pylivemaker/issues/9#issuecomment-1882138018
I'm also looking for this, hoping that I can automate the process.
I also have tried to use lmlsb extract command to dump the lns file. I was thinking to edit it through the lns file. But unfortunately, lmlsb extract is not able to extract the lns file from メッセージボックス作成.lsb file.
The command I run:
lmlsb extract メッセージボックス作成.lsb -o ./メッセージボックス作成.lsb/
I was thinking to edit it through the lns file. But unfortunately,
lmlsb extractis not able to extract the lns file fromメッセージボックス作成.lsbfile.
That's a system/engine lsb file, there is probably no novelscript/lns section in that lsb.
Hi @pmrowla
I've successfully implemented a change that enables the behavior proposed in this thread. ~~My changes are based on the current latest release (v. 1.2.0). However, I encountered problems upon committing to the current main branch. I've observed that the current release of pylivemaker differs from the main branch, which was last updated two years ago. After a thorough investigation, I discovered that the latest release still utilizes CLI libraries corresponding to a commit from around four years ago. Could you please explain why you are still using an older CLI library instead of the most recent version available in the main repository for the release?~~
Sorry, please ignore my previous message. I edited the wrong (the older) pylivemaker installation by mistake.