Jump to content

Badger 2-3

Member
  • Content Count

    16
  • Joined

  • Last visited

  • Medals

Community Reputation

7 Neutral

About Badger 2-3

  • Rank
    Private First Class
  1. Shame... I feel shame. That did the trick. Thank you!
  2. Whether it's in BadgerCore (Project Name), or in Scripts folder -- it doesn't have an impact. From the experience I had back in June (where this approach used to work) - that attribute made it discoverable in the editor under the create tab. It showed up as an entity I could place. Not sure if logs help Compilation 1 started... Succeeded: Engine( scripts/Core ) in 0ms Succeeded: GameLib( scripts/GameLib ) in 30ms Succeeded: Game( scripts/Game ) in 2030ms Succeeded: Entities( ) in 38ms Succeeded: WorkbenchGame( scripts/WorkbenchGameCommon ) in 54ms Succeeded: Workbench( scripts/WorkbenchCommon ) in 13ms Compilation finished... SCRIPT : Reloading game scripts SCRIPT : Script validation SCRIPT : Compiling GameLib scripts SCRIPT : Compiling Game scripts I promise I'm not crazy, I had a whole project working in the past. I got quite comfortable with scripting in this engine. But between Mid June and now It just... doesn't work.
  3. I believe that was an artifact of copying the code block on this website to swap between the syntax highlighting.... was hard to read. Removing that unicode had no impact. IDK if this helps at all but I can write legitimately incorrect code -- where syntax is invalid yet the validation/compilation process succeeds without errors or warnings. It almost feels like it's not compiling/validation my project, but using a different location? When creating a project to test this, I use the default settings I have uninstalled both game / tools more than a few times Deleted the profile/addons off my machine I'm stumped.
  4. I do not have any errors, or warnings in my console.
  5. [EntityEditorProps(category: "GameScripted/Badger", description: "Defines a spawn area for a given side", color: "0 0 255 255")] class SCR_Badger_SpawnAreaClass : SCR_SpawnAreaClass { }; class SCR_Badger_SpawnArea : SCR_SpawnArea { [Attribute("", UIWidgets.CheckBox, "Can this faction spawn if enemies are present in this area?", category: "Badger: Area")] protected bool m_bSpawnIfEnemyPresent; private bool m_bCanSpawn = true; FactionKey GetFaction() { return GetAffiliatedFactionKey(); } bool CanSpawn() { return m_aEnemies.Count() <= 0; } int GetSpawnRadius() { return GetSphereRadius(); } protected override void OnInit(IEntity owner) { super.OnInit(owner); // Supress messages out of playmode, order of things is not quite guaranteed here if (!GetGame().InPlayMode()) return; } }; That's fair I should have uploaded a code sample. I have tried it with AND without that EntityEditorProps attribute and cannot for the life of me get it into the game. This code used to work fine. Have also tried using the category of "GameScripted/GameMode" just to see if it has to be an existing "path" or something.... no dice.
  6. Oh I absolutely agree that the syntax problems would certainly cause problems with the code completion stuff. However, if this was syntax problem I should NOT be able to compile or pass the validation stage! Which is currently what I've been experiencing and it's been driving me nuts. When this first came out I highly praised this validation/compilation step because I got to see errors before running the game! I resorted to making a new project with only 1 script for the sole purpose of figuring out if they broke workbench or not. Everything that I did which worked between May to early June no longer works. I've tried a few different combinations trying to figure things out.... no joy.
  7. Few months ago I was working on a project for Reforger. Things worked! Came back today and I feel like things just.... don't work anymore? Anyone else having problems where the script editor no longer validates? For instance, I had a syntax error, clearly indicated at the beginning of the line with a circle w/ red X. However, when validating/compiling scripts everything was fine. Additionally I noticed the intellisense only works on Arma's stuff, when it used to work on my custom classes/variables and such. For giggles, thinking my project was just... old and needed an update - I created a new project and created a simple entity and component script. Neither of which were made available in the editor. What in tarnation am I doing wrong? Event tried this attribute which worked in the past. [EntityEditorProps(category: "GameScripted/GameMode/Badger", description: "Defines a spawn area for a given side")] Have uninstalled, deleted everything (backed it up because that was a lot of work), then reinstalled both reforger and workbench. Nothing has worked so far. Any ideas?
  8. That's interesting. I use the same spawning technique for instantiating slot compositions (LivingArea, Bunker, Checkpoints etc). From what I can see, lets take LivingArea_S_US_01_1 They have a hierarchy component on every single object in the prefab. From parent to children. Your screenshot looks like you only had the hierarchy component only on the parent? Which to be fair makes more sense to me than having it on every child entity in the prefab.
  9. Didn't occur to me to open ResourceName and see that 😅oops. Never mind what I was rambling on about lol.
  10. I like it! My critique would be swapping the string out for ResourceName type, though I am curious if the engine has an implicit conversion between the two? Otherwise, if we think about a mission-creator perspective we'd want full flexibility. Without the need to update a script over a resource path just to swap something out. Something like the following I believe will be, is, or should be (I have no idea) the standard for assigning these 'Resources'. Which would then trickle down to tools like you made which might need to use ResourceName instead of a string. Perhaps an overload which uses it instead of string? This is a snippet from a project I'm working on. [Attribute("{B3E7B8DC2BAB8ACC}Prefabs/AI/Waypoints/AIWaypoint_SearchAndDestroy.et", UIWidgets.ResourceNamePicker, params: "et", category: "Waypoints", desc: "When attacking, AI are assigned this waypoint")] private ResourceName m_AttackWaypointPrefab;
  11. Badger 2-3

    Custom Configs

    To narrow down the scope of selection I did [Attribute("", UIWidgets.Object, params: "conf class=Badger_TestConfig", category: "Configs")] ref Badger_TestConfig m_pConfig; I have tried this in an array form, but unfortunately it didn't work. Not a big deal. I'm making an attack/defend type of system but thought "what if I want more than 2 sides?" Would be nice to not limit the scenario creator to 2 or 3 sides. Wanna go wild.... go wild.
  12. Badger 2-3

    Custom Configs

    Alright.... I finally got it working. [BaseContainerProps(configRoot:true)] class Badger_TestConfig { }
  13. Badger 2-3

    Custom Configs

    So... I added this attribute, because it's on my other scripts and it "works". So far, the only MissionHeader works as a parent class.... would ideally want a custom class so I don't have random values that aren't needed. [EntityEditorProps(category: "GameScripted/Configs", description: "Faction Information for Attack & Defend Scenario", color: "0 0 255 255")] I have tried the following parent classes with no luck: ScriptAndConfig (odd this doesn't work considering MissionHeader is a child of it) ModuleGameSettings Something behind the scenes is adding these, or considering these classes as configs. Node.c is using ScriptAndConfig but doesn't appear in the config menu. Just a matter of figuring out how, if possible, to add custom configs....
  14. Has anyone had any luck creating custom config classes? I see we have a ScriptAndConfig type, as well as plain classes with no inheritance. Once I compile/reload scripts I was under the impression I'd at least see this new config type I made in the context menu when you right click in resource browser --> new config item --> type in name of file --> should see my config type. Unfortunately it doesn't appear which leads me to believe something else must be done in order to get my custom config to appear as an option... I even tried inheriting from an existing type, MissionHeader just for giggles. Currently trying to clean up the attribute soup I have going on and tidy things up into appropriate config types.
  15. Badger 2-3

    Workbench Login Fails

    Holy smokes that worked. Thank you! Quite an odd bug.... but at least this workaround did the trick
×