-
Notifications
You must be signed in to change notification settings - Fork 93
Slct Listpatch #1251
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
Slct Listpatch #1251
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| using OpenKh.Common; | ||
| using OpenKh.Kh2.Extensions; | ||
| using OpenKh.Kh2.Utils; | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.IO; | ||
| using System.Linq; | ||
| using Xe.BinaryMapper; | ||
|
|
||
| namespace OpenKh.Kh2 | ||
| { | ||
|
|
||
| public class ChoiceEntry | ||
| { | ||
| [Data] public short Id { get; set; } | ||
| [Data] public short MessageId { get; set; } | ||
| } | ||
| public class Slct | ||
| { | ||
|
|
||
| [Data] public ushort Id { get; set; } | ||
| [Data] public byte ChoiceNum { get; set; } | ||
| [Data] public byte ChoiceDefault { get; set; } | ||
|
|
||
| [Data(Count = 4)] public ChoiceEntry[] Choice { get; set; } | ||
| [Data] public short BaseSequence { get; set; } | ||
| [Data] public short TitleSequence { get; set; } | ||
| [Data] public int Information { get; set; } | ||
| [Data] public int EntryId { get; set; } | ||
| [Data] public int Task { get; set; } | ||
| [Data] public byte PauseMode { get; set; } | ||
| [Data] public byte Flag { get; set; } | ||
| [Data] public byte SoundPause { get; set; } | ||
| [Data(Count = 25)] public byte[] Padding { get; set; } | ||
|
|
||
| public static List<Slct> Read(Stream stream) => BaseTable<Slct>.Read(stream); | ||
| public static void Write(Stream stream, IEnumerable<Slct> entries) => | ||
| BaseTable<Slct>.Write(stream, 2, entries); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,7 @@ This document will focus on teaching you how to create mods using the OpenKH Mod | |
| * [soundinfo](#soundinfo-source-example) | ||
| * [place](#place-source-example) | ||
| * [jigsaw](#jigsaw-source-example) | ||
| * [slct](#slct-source-example) | ||
| * [bbsarc](#bbsarc-bbs) | ||
| * [Example of a Fully Complete `mod.yml` File](#an-example-of-a-fully-complete-modyml-can-be-seen-below-and-the-full-source-of-the-mod-can-be-seen-here) | ||
| * [Generating a Simple `mod.yml` for New Mod Authors](#generating-a-simple-modyml-for-new-mod-authors) | ||
|
|
@@ -332,6 +333,7 @@ Asset Example | |
| * `soundinfo` | ||
| * `place` | ||
| * `jigsaw` | ||
| * `slct` | ||
|
|
||
| Asset Example | ||
| ``` | ||
|
|
@@ -863,6 +865,31 @@ Sora: | |
| Unk07: 0 | ||
| Unk08: 0 | ||
| ``` | ||
| ### `slct` Source Example | ||
| ``` | ||
| - Id: 1 | ||
| ChoiceNum: 4 #Amount of options | ||
| ChoiceDefault: 3 #Option to default to | ||
| Choice: | ||
| - Id: 0 #Choice "Function" | ||
| MessageId: 0 #MessageID to assign to the Choice | ||
| - Id: 1 | ||
| MessageId: 1 | ||
| - Id: 2 | ||
| MessageId: 2 | ||
| - Id: 3 | ||
| MessageId: 3 | ||
| BaseSequence: 12 #Signed short, can be negative | ||
| TitleSequence: 13 #Signed short, can be negative | ||
| Information: 14 #Value tends to always be 0? | ||
| EntryId: 15 # | ||
| Task: 16 | ||
| PauseMode: 0 #6 possible values. 0 = Null, 1 = Battle, 2 = Form, 3 = Mission, 4 = Event, 5 = Musical | ||
| Flag: 1 #Two possible flags. 0 Allows you to unpause, 1 disables unpausing to get out of the menu. | ||
| SoundPause: 19 | ||
| Padding: #There are 25 padding bytes in total | ||
| - 0 | ||
| ``` | ||
|
Comment on lines
868
to
892
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a language identifier to the 💡 Suggested fix-```
+```yaml
- Id: 1
ChoiceNum: 4 `#Amount` of options
ChoiceDefault: 3 `#Option` to default to
Choice:
- Id: 0 `#Choice` "Function"
MessageId: 0 `#MessageID` to assign to the Choice
- Id: 1
MessageId: 1
- Id: 2
MessageId: 2
- Id: 3
MessageId: 3
BaseSequence: 12 `#Signed` short, can be negative
TitleSequence: 13 `#Signed` short, can be negative
Information: 14
EntryId: 15
Task: 16
PauseMode: 17
Flag: 18
SoundPause: 19
Padding: `#There` are 25 padding bytes in total
- 0🧰 Tools🪛 markdownlint-cli2 (0.21.0)[warning] 869-869: Fenced code blocks should have a language specified (MD040, fenced-code-language) 🤖 Prompt for AI Agents
Comment on lines
+890
to
+892
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clarify whether partial The comment states "There are 25 padding bytes in total" but the example supplies only one (
If partial specification is valid, a brief note to that effect would prevent authors from accidentally writing malformed entries. 🤖 Prompt for AI Agents |
||
|
|
||
| * `synthpatch` (KH2) - Modifies Mixdata.bar, a file used for various properties related to synthesis in KH2. | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolve contradictory/incomplete inline comments on
InformationandEntryId.14, but the comment reads#Value tends to always be 0?. This directly contradicts the example and will confuse mod authors. Either use0as the example value (matching the stated expectation) or update the comment to reflect why14is shown.EntryId: 15 #has a trailing#with no comment body — the annotation was started but never completed.📝 Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents