added missing assets

This commit is contained in:
Sebastian Bularca
2026-03-22 15:21:28 +01:00
parent 0f0189726e
commit da74abb039
18 changed files with 330 additions and 53 deletions

View File

@@ -98,14 +98,17 @@ namespace Nox.Core {
ISaveSlotManager saveSlotManager = new SaveSlotManager(saveStorage, saveSettings);
saveSystem = new SaveSystem(saveSerializer, saveStorage, saveSlotManager, saveSettings);
var adventuredata = new AdventureData();
var characterSystems = DefaultCharacterSystemsFactory.Create(maxPartySize: 4, new PerkRegistry(), new CharacterRegistry());
var adventureData = new AdventureData();
var characterBaseSettings = Addressables.LoadAssetAsync<CharacterBaseSettings>("CharacterBaseSettings").WaitForCompletion();
var perKRegistry = Addressables.LoadAssetAsync<PerkRegistry>("PerkRegistry").WaitForCompletion();
var characterRegistry = Addressables.LoadAssetAsync<CharacterRegistry>("CharacterRegistry").WaitForCompletion();
var characterSystems = DefaultCharacterSystemsFactory.Create(characterBaseSettings, perKRegistry, characterRegistry);
var partyCreatorModel = new PartyCreatorModel(characterSystems.CharacterFactory, characterSystems.PartyFactory);
applicationStates = new Dictionary<GameState, IGameState> {
[GameState.BootState] = new SplashGameState(bootstrapReferences, gameDataState),
[GameState.MainMenu] = new MainMenuGameState(gameDataState, menuGameStateData, bootstrapReferences, saveSystem, partyCreatorModel, adventuredata),
[GameState.GameMode] = new GameModeGameState(gameDataState, bootstrapReferences, platform.PlatformSettings, saveSystem, sceneTransition, adventuredata),
[GameState.MainMenu] = new MainMenuGameState(gameDataState, menuGameStateData, bootstrapReferences, saveSystem, partyCreatorModel, adventureData),
[GameState.GameMode] = new GameModeGameState(gameDataState, bootstrapReferences, platform.PlatformSettings, saveSystem, sceneTransition, adventureData),
};
createApplicationStateMarker.End();
}

View File

@@ -60,7 +60,7 @@ namespace Nox.Core {
gameDataState.ChangePlayMode(sceneReference.playMode);
}
}
advSettingsHandler = Addressables.LoadAssetAsync<AdventureSettings>("Assets/Database/Game/AdventureSettings.asset");
advSettingsHandler = Addressables.LoadAssetAsync<AdventureSettings>("AdventureSettings");
adventureSettings = advSettingsHandler.WaitForCompletion();
InitializeGameViews();
currentPlaymode = gameDataState.ActivePlayMode;

View File

@@ -0,0 +1,42 @@
using System;
using UnityEngine;
namespace Nox.Game {
[CreateAssetMenu(fileName = "EntitiesBaseSettings", menuName = "Nox/Database/Entities/EntitiesBaseSettings")]
public class CharacterBaseSettings: ScriptableObject {
[Header("Character General Defaults")]
public int startAttributesPool = 12;
[Header("Character Creation Defaults")]
public EntityAttributes defaultEntityAttributes;
public EntityStats defaultEntityStats;
public PerksData defaultPerksData;
public ModifiersData defaultModifiersData;
[Header("General Racial Bonuses and Perks per Class")]
public RacialBonuses [] racialBonuses;
public ClassBonuses [] classBonuses;
[Header("Party System Defaults")]
public int maxPartySize = 4;
}
[Serializable]
public sealed class RacialBonuses {
public CharacterRace race;
public EntityAttributes defaultEntityAttributes;
public EntityStats defaultEntityStats;
public PerksData perksData;
public ModifiersData modifiersData;
}
[Serializable]
public sealed class ClassBonuses {
public CharacterClass @class;
public EntityAttributes defaultEntityAttributes;
public EntityStats defaultEntityStats;
public PerksData perksData;
public ModifiersData modifiersData;
}
}

View File

@@ -2,14 +2,14 @@ using System;
namespace Nox.Game {
public static class DefaultCharacterSystemsFactory {
public static ICharacterSystems Create(int maxPartySize, PerkRegistry perkRegistry, CharacterRegistry characterRegistry) {
public static ICharacterSystems Create(CharacterBaseSettings characterBaseSettings, PerkRegistry perkRegistry, CharacterRegistry characterRegistry) {
IPerkFactory perkFactory = new PerkFactory(perkRegistry);
ICharacterAttributesFactory attributesFactory = new CharacterAttributesFactory(characterRegistry);
ICharacterStatsFactory statsFactory = new CharacterStatsFactory();
ICharacterFactory characterFactory = new CharacterFactory(attributesFactory, statsFactory, perkFactory);
IPartyFactory partyFactory = new PartyFactory(new PartyFactoryOptions {
minPartySize = 1,
maxPartySize = maxPartySize,
maxPartySize = characterBaseSettings.maxPartySize,
enforceUniqueCharacterIds = true
});

View File

@@ -1,18 +0,0 @@
using UnityEngine;
namespace Nox.Game {
[CreateAssetMenu(fileName = "EntitiesBaseSettings", menuName = "Nox/Database/Entities/EntitiesBaseSettings")]
public class EntitiesBaseSettings: ScriptableObject {
[Header("Character Creation")]
public int startAttributesPool = 12;
public int startLevel = 1;
public RacialBonus [] racialBonuses;
}
public class RacialBonus {
public CharacterRace race;
public CharacterClass characterClass;
public int bonus;
}
}