Jump to content


Development Team
  • Posts

  • Joined

  • Last visited

  • Days Won


Gijs-Jan last won the day on February 17

Gijs-Jan had the most liked content!


27 Excellent


  • Biography
    Game developer enthusiast!

    M.Sc. Artificial Intelligence; Maastricht University
    Lead Developer / Owner of CodePoKE.
  • Location
    Maastricht, Netherlands

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thank you for providing the save game, I'll jump right on it!
  2. Do you maybe have a save file during the mission you could share?
  3. Thanks for the follow up - feel free to tag me in posts again if you encounter it; in the most ideal case with a save! I will starting hunting for this from this side! What might be happening is that the outcome of a grenade blast "leaks" the information of the units it doesn't have sight on - as part of the routine that uses grenades to "tactical advantage" (I.e. blasting open choke points, etc), which might give that tile a "score" because it hits units...
  4. This is definitely the case in this game. Going from the screenshot, I'd say the AI was doing something I wouldn't expect it to do. As in, I don't see any enemy unit having sight on your unit. But I'd need the save game to give more insight. If an AI unit moves and at any point gets LOS onto units of yours, all AI units will know about this unit, and they'll retain LOS according to the game's sight rules (i.e. till end of turn)
  5. Except for the Unity development console which lists errors, which we've hidden, there's none. There are minimal developer tools that are in the released game except for some cheats and debug information in GC. Given that we work in Unity, most development tools are exposed through that. public static readonly string SHOW_FPS = "-showFPS"; public static readonly string CHEAT_MODE = "-cheatmode"; public static readonly string SHOW_DEBUG_UI = "-showDebugUI"; public static readonly string DEBUG_AI = "-debugAI"; The above are the command line arguments you can give the program. cheatmode & showDebugUI enable the cheats in GC & visualization. The GC has a grid data visualizer: List of GC cheats: ``` ALT-RMB: Select the entity represented by the GameObject under the cursor in the hierarchy. ALT-SHIFT-RMB: Select the GameObject under the cursor in the hierarchy. CTRL+SHIFT+V: Kill all aliens and win the mission. Health M: Set entity under the cursor to full health. B: Report mission state. CTRL+SHIFT+M: Stun Vips and kill enemies. N: Set entity under the cursor to 25% health SHIFT+U: Set selected unit to 1000 HP U: Set selected unit to Max Hp Time Units Shitft+T: Set selected unit to 1000 TU T: Set selected unit to Max Tu Others O: Enable/Disable corner peeking R: Refill ammo clip K: Kill unit under the cursor Y: Teleport selected unit ALT+L: Toggle wall hiding [: Switched to ConnectedAdjacentCoverFinder ]: Switched to AdjacentCoverFinder ```
  6. Very nicely done! If you do have specific questions, feel free to ask. I can't promise I'll reply in a timely fashion given that we're laser focused on the upcoming deadline, but I'll do what I can. The GeoscapeMovementSystem is best seen as a very trivial physics system (apply velocity, etc), the NavigationSystem indeed is the system that given a target converts it into a target velocity, etc. This was done so we can have different strategies driving the movement (AI, physics, etc) - and is mostly a hold over from when we had different designs.
  7. Very nicely done! Would you mind sharing the code & setup as I'm very interested in keeping track of what issues people run into during more complex modding. Also, are there any particular issues you ran into while rummaging around the codebase?
  8. Excellent, thank you! I'll try to take a look as soon as possible. Is the bug reproducible for you when loading from the start of turn? And what are the steps to reproduce the bug?
  9. Great to hear that it just works. I think some of the issues (CTRL-click) will be solveable once we move more things into configurable keybindings. In general we already allow rebinding 95% of the keys, so I think you should be good. The moving between strategy screens using hotkeys I'll note down, I think it might be interesting for PC users as well - and then you can use it using configurable keybinding. The default accept for a dialog might already be in the game, I think. (By default bound to Enter maybe?)
  10. Pretty much spot on for both! We still have code for injuries and I suspect that modding it back in will be straightforward.
  11. We haven't looked into Steam Deck support at all and there's no guarantee - but it would be helpful to maybe have an indication of what issues currently exist!
  12. Damage localization works by determining what part of the body got hit according to this table: (First is Chance to Hit -> Location, Second is Location -> Modifier on Damage) /// <summary> /// Provides the hitchance table for locational damage, per https://trello.com/c/aYcOD0N3/303-locational-damage /// Used in <see cref="SingleTargetDamage"/>. /// </summary> public static readonly OddmentTable<DamageLocation> DAMAGE_LOCATION_HIT_CHANCE = new OddmentTable<DamageLocation> { {15f, DamageLocation.Head()}, {15f, DamageLocation.Neck()}, {40f, DamageLocation.Body()}, {4f, DamageLocation.LeftArm()}, {4f, DamageLocation.RightArm()}, {4f, DamageLocation.LeftLeg()}, {4f, DamageLocation.RightLeg()}, {14f, DamageLocation.Graze()}, }; /// <summary> /// Provides the modifiers to locational damage, per https://trello.com/c/aYcOD0N3/303-locational-damage /// Used in <see cref="SingleTargetDamage"/>. /// </summary> public static readonly Dictionary<DamageLocation, float> DAMAGE_LOCATION_MODIFIER = new Dictionary<DamageLocation, float> { {DamageLocation.Head(), 1.5f}, {DamageLocation.Neck(), 1.25f}, {DamageLocation.Body(), 1}, {DamageLocation.LeftArm(), 0.75f}, {DamageLocation.RightArm(), 0.75f}, {DamageLocation.LeftLeg(), 0.75f}, {DamageLocation.RightLeg(), 0.75f}, {DamageLocation.Graze(), 0.5f} };
  13. > I hadn't encountered that before in Unity games, but I suppose it makes sense. Wouldn't that make it easier to upgrade though? Yes, it does in general, however the issue is mostly in the third party plugins we use that also then need to be upgraded. Personally I would like to upgrade, even if just for the tooling and speedups that Unity now has. The problem is mostly that we simply don't have the budget at the moment and given the length of development the focus is and was on finishing the game. > About the hooks: if I want to have code execute every time the game uses a specific method I'd need to patch that method, and I haven't found many hooks in that native C# part. For instance, I would like to execute something when the strategy screen is loaded, but there is not something like an event I can subscribe to (or is there?) The core of our game is an ECS framework I developed that you will find under the Artitas namespace. The `World` class in this namespace is the general entry point to managing an ECS instance. This framework has two aspects: high level communication through messages inheriting from `IEvent`, which any `System` can listen to by annotating methods with `Subscriber` - and low-level event handling based on changes to entities through `Family`. In general we setup mechanics in `System`s, with each System listening to certain events and setting up various Family-s to respond to events. A System can listen to any event, define its priority, and if needed stop event propagation. To get an overview of compositions of entities we use, look into the classes that end in `Archetypes`. tl;dr: look at the inheritance of `IEvent` for all the high level communication you can hook into. A `World` can have `System`s registered and unregistered at runtime - the main way in which we want to support modding. The core entry point of the game is `XenonautsMain`, with `StrategyScreen` & `GroundCombatScreen` being the core entry points for each section of the game. In those Screen classes you'll find the setup of the World and its Systems. > Executing Harmony.PatchAll gave a System.MissingMethodException about System.Reflection.PropertyInfo.op_Inequality. But for some reason I was being quite dumb and was building against .NET Framework 4.8 instead of 3.5 (Harmony luckily still supports that), so changing the build target actually solved it Yeah, that'll be it :D. I'd love to be able to upgrade :')
  14. Xenonauts 2 uses Unity predominantly as a rendering and authoring engine - most of the logic is actually unobfuscated, native C# (not inheriting from Monobehaviour) and all the hooks that the programmers have are exposed to modders. It did not make much sense to go with a scene-based approach because most content is not static - Ground Combat is fully generated at runtime, there are no separate Scenes. It's mostly UI or visual aspects which use Monobehaviour based inheritance, the rest is full native C#. I will provide an outline with an example once we are further along how to create proper mods using injection, which to my recollection does work but it has been some time since I last tested it. Can you be more detailed in what issues you ran into getting Harmony to work? At the moment we are completely focused on the early access release though, so I can't commit any resources to helping you out, but if you can provide the information then I have it available when I will.
  • Create New...