chasmical / roguelibs Goto Github PK
View Code? Open in Web Editor NEWStreets of Rogue Modding Library
Home Page: https://chasmical.github.io/RogueLibs/
License: MIT License
Streets of Rogue Modding Library
Home Page: https://chasmical.github.io/RogueLibs/
License: MIT License
Need start work on custom events
CustomItem.GetCount
doesn't get called for every frame.
Mod content additions will make the player's List Boxes (for Mutators, Traits, etc.) crowded and difficult to traverse.
Create a system that allows the modder to assign their content to Menu Groups. If RogueLibs detects a Menu Group, it will create a collapsible/expandable menu group. The ones used in AToM were ideal.
No response
https://abbysssal.github.io/RogueLibs/docs/unlocks/overriding-behavior
Write documentation on how to override default unlocks' or buttons' behavior, plus, some examples.
Make these screenshots.
I was planning on adding full support of "Operating" bar interactions during the v3.5.0 beta, but then forgot.
Not really sure how it will work at the moment. There needs to be at least two handlers: one to handle an interruption, and another one to handle the completion.
No response
The localization system in the game is awful. It's so bad that it's disturbing.
Here's how it works right now:
string.Replace
to replace double quotes with single quotes;And then for every single GetName
call:
Type.GetTypeFromHandle
to get the enum's type;int
and use it as an index 😕;Here's my solution:
As for GetName
:
Dictionary<string, string>
.No response
Custom content unlocks are not saved.
Generate a file that keeps track of the player's unlocks.
No.
Create a documentation page about unlocks menus. More info on how they work with RogueLibs' patches, possible caveats.
https://abbysssal.github.io/RogueLibs/docs/unlocks/custom-mutators
Write documentation on how to create custom mutators.
Accessing in-game display name from TraitInfo class is relatively complicated.
Considering the game's code uses string comparisons so frequently, I'd find it useful if that field were exposed.
No response
When using the level editor, pressing "Yes" on a Yes/No dialogue correctly loads the content, but does not close the dialogue
Close the dialogue
[Error : Unity Log] IndexOutOfRangeException: Index was outside the bounds of the array.
Stack trace:
tk2dRuntime.TileMap.RenderMeshBuilder.BuildForChunk (tk2dTileMap tileMap, tk2dRuntime.TileMap.SpriteChunk chunk, tk2dRuntime.TileMap.ColorChunk colorChunk, System.Boolean useColor, System.Boolean skipPrefabs, System.Int32 baseX, System.Int32 baseY) (at <9086a7372c854d5a8678e46a74a50fc1>:0)
tk2dRuntime.TileMap.RenderMeshBuilder.Build (tk2dTileMap tileMap, System.Boolean editMode, System.Boolean forceBuild) (at <9086a7372c854d5a8678e46a74a50fc1>:0)
tk2dTileMap.Build (tk2dTileMap+BuildFlags buildFlags) (at <9086a7372c854d5a8678e46a74a50fc1>:0)
tk2dTileMap.Build () (at <9086a7372c854d5a8678e46a74a50fc1>:0)
LevelEditor.BuildAllTiles () (at <9086a7372c854d5a8678e46a74a50fc1>:0)
LevelEditor.RefreshChunks () (at <9086a7372c854d5a8678e46a74a50fc1>:0)
LevelEditor.PressedYesButton () (at <9086a7372c854d5a8678e46a74a50fc1>:0)
UnityEngine.Events.InvokableCall.Invoke () (at <a5d0703505154901897ebf80e8784beb>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <a5d0703505154901897ebf80e8784beb>:0)
UnityEngine.UI.Button.Press () (at <d5bb9c19c2a7429db6c6658c41074b11>:0)
UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at <d5bb9c19c2a7429db6c6658c41074b11>:0)
UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at <d5bb9c19c2a7429db6c6658c41074b11>:0)
UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at <d5bb9c19c2a7429db6c6658c41074b11>:0)
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
Rewired.Integration.UnityUI.RewiredStandaloneInputModule:ProcessMousePress(MouseButtonEventData)
Rewired.Integration.UnityUI.RewiredStandaloneInputModule:ProcessMouseEvent(Int32, Int32)
Rewired.Integration.UnityUI.RewiredStandaloneInputModule:ProcessMouseEvents()
Rewired.Integration.UnityUI.RewiredStandaloneInputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()
Windows 64-bit
v95
v3.x.x
RL, SpritePackLoader, BTHarmonyUtils, CCU, DemolishThatFreakingWall
https://abbysssal.github.io/RogueLibs/docs/items/recharging-items
Documentation on how to use IDoUpdate
and CustomItem.GetItemCount
to make recharging items.
Sometimes you can't ask your followers to attack, stand guard or follow. These interactions still exist, but are unresponsive. Maybe it's caused by the implementation of custom interactions.
You can always ask your followers to attack, stand guard or follow.
Windows 64-bit
v96
v3.5.2
No response
https://abbysssal.github.io/RogueLibs/docs/traits/create-effect
Documentation on how to create custom effects, use CustomEffect
class, how to initialize it, properties and maybe some examples.
When hacking a hackable NPC when you have the Speed Coder trait, none of the hacking options show up. The camera pans to the NPC as normal, but no options show up.
Same applies when playing as an SSA Hacker.
There's no option for it in the "What version of the game are you running?" section so I'm gonna say here it's latest vanilla SOR version (v98)
When the NPC is hacked, the usual hacking options show up.
No response
Windows 64-bit
v97
v3.6.9
No response
Mutators are added to the Home Base menu, but not the Level Editor one
Ensure this fix applies to all custom content, not just mutators
No response
Currently, Vanilla_____
classes don't have all of the identifiers. For instance, VanillaTraits
doesn't have a lot of + versions of traits.
Created Mutator Unlocks appear in all versions of the menu (Campaign, Level, and Home Base).
Add virtual (true) bools to MutatorUnlock:
Vanilla code targets:
No response
Need start work on custom npc
Traits listed as "Conflicting" to a character's existing traits still show up in the level-up trait choices.
Adding custom interactions with objects is really complicated, especially if you want your interactions to be compatible with other mods' interactions. Also the methods are really inconsistent, and sometimes you might just need a couple of postfix-patches, and sometimes even a transpiler.
Implement custom interactions in RLv3 via hooks.
InteractionModel
will manage the interactions for a PlayfieldObject
. It will gather actions from a global list of IInteractionProvider
s, sort and filter them and then display the menu with buttons. The base class is abstract, and all actual instances derive from InteractionModel<T>
.
IInteractionProvider
will create Interaction
s, bind them to the current object and pass them to the manager. They are stored in RogueInteractions.Providers
.
Interaction
is a base class for managing the button-action itself: its name, price, extra information and etc. There will be two default implementations of that class - CustomInteraction
, exposed for mod developers, and SimpleInteraction
that uses a simplified syntax with delegates (see SimpleInteractionProvider
).
No response
Here's how vanilla Barbecue interactions could be defined:
// All of the used delegates must be static to avoid referencing outdated variables.
// Properties that should not be accessed should throw an InvalidOperationException.
// This method uses the simplified syntax, using SimpleInteractionProvider<Barbecue>
RogueInteractions.CreateProvider<Barbecue>(static h => // 'h' is for 'handler'
{
if (h.Helper.interactingFar) return; // No buttons will be added
if (h.Object.burntOut)
{
// Set what will happen, if the interaction is unsuccessful.
// Interaction is unsuccessful only if there are no available buttons or if one
// of the providers stopped the interaction forcefully (`h.StopInteraction()`).
h.SetStopCallback(static m => m.Agent.SayDialogue("BarbecueBurntOut"));
// Use it to tell the player why the operation was unsuccessful.
}
else if (h.Object.ora.hasParticleEffect)
{
if (h.Agent.inventory.HasItem(VanillaItems.Fud))
{
// Creates a button, that, when clicked, will call the specified delegate.
h.AddButton("GrillFud", static m => // 'm' is for 'model'
{
m.Object.StartCoroutine(m.Object.Operating(m.Agent, null, 2f, true, "Grilling"));
});
}
else h.SetStopCallback(static m => m.Agent.SayDialogue("CantGrillFud"));
}
else
{
if (h.Agent.inventory.HasItem(VanillaItems.CigaretteLighter))
{
h.AddButton("LightBarbecue", static m =>
{
m.Object.StartFireInObject();
m.StopInteraction();
});
}
else h.SetStopCallback(static m => m.Agent.SayDialogue("CantOperateBarbecue"));
}
});
Should vanilla interactions derive from a separate class VanillaInteraction
instead? If so, then should all vanilla interactions be rewritten as individual classes, or should a simplified syntax be used?
I can't believe Mono managed to somehow mess up ConditionalWeakTable. It's literally its only purpose - to have weak references to the keys.
When GC collects garbage, unreferenced keys are removed from ConditionalWeakTable.
No response
Windows 64-bit
v98
v4.0.0-beta.6
pretty much all of them
I'm always frustrated when I have to do over 20 patches just to make a simple Flaming Sword. I want to do it without patches, using some kind of a custom melee weapon class in RogueLibs.
Custom weapon classes: CustomWeaponMelee
, CustomWeaponThrown
, CustomWeaponProjectile
(+ extra interfaces that implement additional functionality)
When someone plays with a controller, the inventory toolbar is plus-shaped, and the version text ("SoR v98, RL v4.0.0-beta.8") is rendered on top of it.
When someone plays with a controller, the inventory toolbar and the version text don't overlap. If "SoR v98" is moved one line higher, RL's version text won't get in the way, if the version is stable (without SemVer pre-release identifiers).
No response
Windows 64-bit
v98
v4.0.0-beta.8
No response
https://abbysssal.github.io/RogueLibs/docs/items/usable-abilities
Rename that page to "Targetable Abilities" and move it a bit lower in the list. Write documentation on how to create targetable abilities using the IAbilityTargetable
interface. The main Creating a Custom Ability page will describe how to create simple usable abilities.
https://abbysssal.github.io/RogueLibs/docs/items/create-ability
Documentation on how to create custom abilities using the CustomAbility
class, + point out the similarities between items and abilities.
https://abbysssal.github.io/RogueLibs/docs/items/rechargeable-abilities
Write documentation on how to create rechargeable abilities using the IAbilityRechargeable
interface, with some examples.
There's currently no simple way to register conflicts between Traits and Mutators. Some traits might be pointless for a player to take with a certain mutator. E.g., Lock & Load + Unlimited Ammo.
Add lists to
Relevant vanilla code: ScrollingMenu.CanHaveTrait
No response
Consider the following situation: a developer, despite all recommendations and warnings, typed their own category strings in ItemCategoriesAttribute
: [ItemCategories("Stealth", "Usalbe")]
, and they can't figure out why some feature, related to "Usable" category, isn't working.
RogueLibs will track all existing categories and log a warning, if it encounters a name or a category, that it doesn't know about. You can add your own strings and INameValidator
s in RogueFramework
. Custom names will be automatically added to an instance of the default INameValidator
implementation.
It might be heavy on the performance, but, I guess, it can be helpful sometimes.
Don't make typos.
Dropped/spawned items are sometimes purple, when the player is not close to them.
Normal sprites to appear.
Weapons' first frames are purple.
A normal projectile weapon's sprite to appear.
If player goes to Home Base, mutator shows as active but deactivates when going through elevator. It will stay active if you visit the Mutators hacker.
If player goes directly into Quick Start, mutator will not be active.
https://abbysssal.github.io/RogueLibs/docs/items/targetable-items
Documentation on how to use IItemTargetable
and some examples.
https://abbysssal.github.io/RogueLibs/docs/items/targetable-items-plus
Documentation on how to use IItemTargetableAnywhere
and some examples.
https://abbysssal.github.io/RogueLibs/docs/unlocks/custom-unlocks
Write documentation on how unlocks, both custom and non-custom, work and how to use them.
After uninstalling RogueLibs, all trait unlocks disappear from the Traits menu.
RogueLibs makes some changes to the way unlock fields work, and while it makes modding the game a little bit more manageable, the effects of RogueLibs on unlocks should at least be reversed, when saving them to a save file.
After uninstalling RogueLibs, all trait unlocks should appear in the Traits menu and work as expected.
No response
Windows 64-bit
v95
v3.x.x
Only RogueLibs
https://abbysssal.github.io/RogueLibs/docs/items/chargeable-abilities
Write documentation on how to create chargeable abilities using the IAbilityChargeable
interface, explain the caveats, and add some examples.
How to reproduce, run the game, select a character then return to menu.
I think that the method add sprite run twice producing the error.
[Error : Unity Log] ArgumentException: An element with the same key already exists in the dictionary.
Stack trace:
System.Collections.Generic.Dictionary`2<string, UnityEngine.Sprite>.Add (string,UnityEngine.Sprite) <0x00330>
RogueLibsCore.RogueLibsPlugin.GameResources_SetupDics (GameResources) <0x0008f>
(wrapper dynamic-method) GameResources.DMD<GameResources..SetupDics> (GameResources) <0x143b1>
GameController.Awake () <0x002cd>
[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
ProTip.Awake ()
ps: I also get the same error when using the custom item exemple with sprite.
I'm not frustrated, but I'm not happy with the current extension methods.
There currently is no clean way to call these methods with a dynamic (e.g. random) set of CustomTraits.
For example, one may want to do this:
Type[] traits = { typeof(Trait1), typeof(Trait2), typeof(Trait3) };
int random = Random.Range(0, 2);
agent.AddTrait(traits[random]);
There is a workaround of using TraitInfo.Get(traitType).Name
but it would be nicer to have corresponding extension methods available.
Create these overloads in RogueExtensions:
object AddTrait(this Agent agent, Type traitType)
object GetTrait(this Agent agent, Type traitType)
bool HasTrait(this Agent agent, Type traitType)
You could also argue that the TraitInfo.Get workaround is sufficient and close this issue, but I'd rather you don't.
There's a ton of vanilla interactions to rewrite and objects to patch.
This issue will track the current progress.
✅(?)Agent
, ✅AirConditioner
, ✅AlarmButton
, ✅Altar
, ✅AmmoDispenser
, ✅ArcadeGame
, ✅ATMMachine
, ✅AugmentationBooth
, ✅Barbecue
, ✅BarbedWire
, ✅Bars
, ✅BarStool
, ✅Bathtub
, ✅Bed
, ✅Boulder
, ✅BoulderSmall
, ✅Bush
, ✅CapsuleMachine
, ✅Chair
, ✅ChestBasic
, ✅CloneMachine
, ✅Computer
, ✅Counter
, ✅Crate
, ✅Desk
, ✅Door
, ✅Elevator
, ✅ExplodingBarrel
, ✅FireHydrant
, ✅Fireplace
, ✅FireSpewer
, ✅FlameGrate
, ✅FlamingBarrel
, ✅GasVent
, ✅Generator
, ✅Generator2
, ✅Gravestone
, ✅(?)Item
, ✅Jukebox
, ✅KillerPlant
, ✅Lamp
, ✅LaserEmitter
, ✅LoadoutMachine
, ✅LockdownWall
, ✅Manhole
, ✅MineCart
, ✅MovieScreen
, ✅PawnShopMachine
, ✅Plant
, ✅Podium
, ✅PoliceBox
, ✅PoolTable
, ✅PowerBox
, ✅Refrigerator
, ✅Safe
, ✅SatelliteDish
, ✅SawBlade
, ✅SecurityCam
, ✅Shelf
, ✅Sign
, ✅SlimeBarrel
, ✅SlimePuddle
, ✅SlotMachine
, ✅Speaker
, ✅Stove
, ✅SwitchBasic
, ✅Table
, ✅TableBig
, ✅Television
, ✅Toilet
, ✅Train
, ✅TrapDoor
, ✅TrashCan
, ✅Tree
, ✅Tube
, ✅Turntables
, ✅Turret
, ✅VendorCart
, ✅WasteBasket
, ✅WaterPump
, ✅Well
, ✅Window
.
Legend:
❌ - not implemented, 🔹 - not tested, 🔸 - testing failed, ✅ - implemented, (?) - may be tricky to implement.
No response
When I come up to a lockdown wall, I can interact with it normally, but there's no highlighting, like with other interactable objects.
I've mentioned that in #50. It's not a critical issue, so I decided to postpone this bug fix.
The lockdown wall, when approached and when having interactions, should be highlighted.
No response
Windows 64-bit
v96
v3.5.0
RogueLibs, EnableDebugTools
A highlighted default spritesheet appears on the items held by NPCs.
A normal sprite to appear, without the highlighted spritesheet.
Operating system: Windows 64-bit
Version of the game: v94
Version of RogueLibs: v3.0.0-rc.2
Other installed mods: SpritePackLoader
MoneyA has the same shadow size as MoneyB and MoneyC.
MoneyA to have a smaller shadow.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.