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

[B1] Unknown fields type for entities #21

Open
LucBerge opened this issue Jul 20, 2022 · 1 comment
Open

[B1] Unknown fields type for entities #21

LucBerge opened this issue Jul 20, 2022 · 1 comment
Assignees

Comments

@LucBerge
Copy link
Member

LucBerge commented Jul 20, 2022

In the enties files, the field type are negative numbers. Display the type in string instead of the number.

-1 : integer
-2 : boolean
-3 : utf (string)
-4 : double
-5 : i18n
-6 : unsigned_integer (id of entity)
-99 : list

Rewrite the D2oReader class

@LucBerge LucBerge changed the title Unknown fields type for entities [Job B] Unknown fields type for entities Jan 2, 2023
@LucBerge LucBerge changed the title [Job B] Unknown fields type for entities [B1] Unknown fields type for entities Feb 5, 2023
@Bia10
Copy link

Bia10 commented Feb 27, 2023

Well lets not rush this, as this will be a breaking change to my entity definition parser, so lets look what data says

Following value groups are found in the json data:

5 : reference type

type:  MonsterDrop

4 : reference type

type: MonsterDropCoefficient
type: EffectZone

3 : reference type

type: MonsterGrade
type: EffectInstanceDice

2 : reference type

TypeValue: 2 NameValue: parameters  => type: QuestObjectiveParameters
TypeValue: 2 NameValue: bonusCharacteristics => type:  MonsterBonusCharacteristics
TypeValue: 2 NameValue: SoundUi

1 : reference type

TypeValue: 1 NameValue: coords  => type:  Point
TypeValue: 1 NameValue: bounds  => type:  Rectangle
TypeValue: 1 NameValue: BreedRoleByBreed

-1 : int

TypeValue: -1 NameValue: npcId
TypeValue: -1 NameValue: monsterId

-2 : bool/boolean

TypeValue: -2 NameValue: isVisible
TypeValue: -2 NameValue: isTransition

-3 : string can be a single string or strings with separator as one string

TypeValue: -3 NameValue: animName
TypeValue: -3 NameValue: aggressiveImmunityCriterion
TypeValue: -3 NameValue: adminName

-4 : double (64bit), actually could be single/float(32bit) as most data contained in it don't require double precision

TypeValue: -4 NameValue: scaleY
TypeValue: -4 NameValue: scaleX
TypeValue: -4 NameValue: random
TypeValue: -4 NameValue: probability

-5 : integer which is a key in translation file

TypeValue: -5 NameValue: sectorNameId
TypeValue: -5 NameValue: theoreticalDescriptionId
TypeValue: -5 NameValue: textStringId
TypeValue: -5 NameValue: textKey

-6 : uint

TypeValue: -6 NameValue: spellLevelId
TypeValue: -6 NameValue: rewardId
TypeValue: -6 NameValue: resultTypeId
TypeValue: -6 NameValue: requiredSubDays
TypeValue: -6 NameValue: packId

-99 : public class Vector extends AbstractList implements List, RandomAccess, Cloneable, Serializable

1. Vector of basic type: Vector<int>

1.5 Vector of generic numeric type : Vector<Number>

numeric values that are convertible to the primitive types byte, double, float, int, long, and short.

always end in -4 likely a float

2. Vector of complex type: Vector<Point>

3. Vector of vector type of simple type: Vector<Vector<int>>

3.5 Vector of vector type of generic numeric type: Vector<Vector<Number>>

again ends in -4 a float likely

	"name": "statPerLevelRange",
	"type": -99,
	"vectorTypes": {
		"name": "Vector.<Vector.<Number>>",
		"type": -99,
		"vectorTypes": {
			"name": "Vector.<Number>",
			"type": -4
		}
	}

	"statPerLevelRange": [
		[
			1.0,
			3.0
		],
		[
			50.0,
			3.0
		],
		[
			100.0,
			5.0
		],
		[
			150.0,
			7.0
		],
		[
			200.0,
			9.0
		]
	]

4. Vector of vector type of complex type: Vector<Vector<Point>>

@LucBerge LucBerge self-assigned this Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants