Master of Oreon World Manager Interface for Terasology
terasology / masteroforeon Goto Github PK
View Code? Open in Web Editor NEWMaster the Oreons, or others like them, from the throne-world of the Ancients! A menu command system.
Master the Oreons, or others like them, from the throne-world of the Ancients! A menu command system.
Master of Oreon World Manager Interface for Terasology
When opening the Task Selection Screen within the game, the image showcased is the default one, blueprint.png. That image is hardcoded within the module, at the file taskSelectionScreen.ui
L89:
"image": "MasterOfOreon:blueprint",
Associate the rest of the new assets to the list items that they represent, and showcase them to the preview UIImage of the screen based on which item list is clicked.
E.g.: When the user clicks Guard
within the list at the Task Selection Screen, then the UIImage shall showcase the guardBlueprint.png
.
UIImage
It has ID "selectionImage"
and is located within the taskSelectionScreen.ui
.
All assets can be tracked down through the PR #72. Each asset is named after the list item they represent.
There are two different plant assets for the above enhancement. Currently, when you choose the "Plant" option, you move to the Plant Selection Screen in which there you choose one of the two plants. Thus, use whichever plant image you want for now for the Task Selection Screen.
It is possible that there is going to be a merge of the Task Selection Screen and the Plant Screen, thus the need for both images will end up being used within the Task Selection Screen. Issue for that enhancement: #74.
The following NPE occurs just before the Oreon entity is destroyed. This might be caused due to the DeathTimeComponent
's "custom" constructor.
[main] INFO o.t.logic.behavior.core.ActionNode - Exception while running action org.terasology.taskSystem.actions.NeedsFoodNode@688fb13b from entity EntityRef{id = 565, netId = 0, prefab = 'Oreons:OreonBuilder'}:
java.lang.NullPointerException: null
at org.terasology.reflection.metadata.ClassMetadata.copy(ClassMetadata.java:174)
at org.terasology.reflection.metadata.AbstractClassLibrary.copy(AbstractClassLibrary.java:124)
at org.terasology.persistence.internal.EntitySetDeltaRecorder.onEntityComponentChange(EntitySetDeltaRecorder.java:69)
at org.terasology.persistence.internal.EntitySetDeltaRecorder.onEntityComponentAdded(EntitySetDeltaRecorder.java:61)
at org.terasology.persistence.internal.ReadWriteStorageManager.onEntityComponentAdded(ReadWriteStorageManager.java:488)
at org.terasology.entitySystem.entity.internal.PojoEntityManager.notifyComponentAdded(PojoEntityManager.java:618)
at org.terasology.entitySystem.entity.internal.PojoEntityManager.addComponent(PojoEntityManager.java:461)
at org.terasology.entitySystem.entity.internal.BaseEntityRef.addComponent(BaseEntityRef.java:167)
at org.terasology.deathSystem.DeathSystem.destroyOreon(DeathSystem.java:77)
at org.terasology.healthSystem.OreonHealthSystem.checkOreonHealth(OreonHealthSystem.java:101)
at org.terasology.healthSystem.OreonHealthSystem.reduceHealth(OreonHealthSystem.java:89)
at org.terasology.taskSystem.actions.NeedsFoodNode.modify(NeedsFoodNode.java:93)
at org.terasology.logic.behavior.core.ActionNode.execute(ActionNode.java:78)
at org.terasology.logic.behavior.core.SelectorNode.execute(SelectorNode.java:52)
at org.terasology.logic.behavior.actions.LookupAction.modify(LookupAction.java:53)
at org.terasology.logic.behavior.core.ActionNode.execute(ActionNode.java:78)
at org.terasology.logic.behavior.core.DelegateNode.execute(DelegateNode.java:91)
at org.terasology.logic.behavior.DefaultBehaviorTreeRunner$1.execute(DefaultBehaviorTreeRunner.java:64)
at org.terasology.logic.behavior.core.SelectorNode.execute(SelectorNode.java:52)
at org.terasology.logic.behavior.core.DelegateNode.execute(DelegateNode.java:91)
at org.terasology.logic.behavior.DefaultBehaviorTreeRunner$1.execute(DefaultBehaviorTreeRunner.java:64)
at org.terasology.logic.behavior.core.SelectorNode.execute(SelectorNode.java:52)
at org.terasology.logic.behavior.core.DelegateNode.execute(DelegateNode.java:91)
at org.terasology.logic.behavior.DefaultBehaviorTreeRunner$1.execute(DefaultBehaviorTreeRunner.java:64)
at org.terasology.logic.behavior.core.DecoratorNode.runChild(DecoratorNode.java:76)
at org.terasology.logic.behavior.core.DecoratorNode.execute(DecoratorNode.java:89)
at org.terasology.logic.behavior.core.DelegateNode.execute(DelegateNode.java:91)
at org.terasology.logic.behavior.DefaultBehaviorTreeRunner$1.execute(DefaultBehaviorTreeRunner.java:64)
at org.terasology.logic.behavior.core.DynamicSelectorNode.execute(DynamicSelectorNode.java:54)
at org.terasology.logic.behavior.core.DelegateNode.execute(DelegateNode.java:91)
at org.terasology.logic.behavior.DefaultBehaviorTreeRunner$1.execute(DefaultBehaviorTreeRunner.java:64)
at org.terasology.logic.behavior.DefaultBehaviorTreeRunner.step(DefaultBehaviorTreeRunner.java:84)
at org.terasology.logic.behavior.Interpreter.tick(Interpreter.java:62)
at org.terasology.logic.behavior.BehaviorSystem.update(BehaviorSystem.java:105)
at org.terasology.engine.modes.StateIngame.update(StateIngame.java:181)
at org.terasology.engine.TerasologyEngine.tick(TerasologyEngine.java:446)
at org.terasology.engine.TerasologyEngine.mainLoop(TerasologyEngine.java:409)
at org.terasology.engine.TerasologyEngine.run(TerasologyEngine.java:385)
at org.terasology.engine.Terasology.main(Terasology.java:154)
Oreons currently have various attributes like the Strength and Intelligence which should be taken into account while assigning them tasks and when they are performing these tasks(like time taken to complete a task should be less if the required attributes for a task closely match the Oreon's strong suit).
The Oreons are currently spawned, provided rather inconsistently, using the summon menu. This should be changed to a resource based spawn, wherein the player would have to give up certain resources to spawn Oreons from the Portal. Main issue here.
Code related to the following has been deleted as part of the issue #3 resolution, in the corresponding PR, so listing them here for future reference :
SummonMinionMenuSystem
from the Miniion module using the createMinion
method from the class.MinionComponent
.Merging MovingBlocks/Terasology#3456 causes this module to no longer compile.
Sending this @eviltak's way as the author of the engine PR and/or to @Naman-sopho in case of interest :-)
Create a Diner and a storage in a game.
Open Upgrade screen for Storage first, then for diner.
Second time also it's getting opened for Storage only not for diner.
Due to the absence of implemented TypeHandlers
for data types like Queue<EntityRef>
, List<EntityRef>
etc. the replication of various fields does not take place over the network and thus many crucial systems in MOO do not work as intended in multiplayer. Another side effect of this is no persistence of these across saved game, so all added availableTasks
(a Queue) would not be carried forward if you open a saved game.
This engine PR addresses this issue .
Known component fields with issue :
Queue<EntityRef> availableTasks
List<EntityRef> assignedAreas
List<EntityRef> constructedBuildings
HoldingComponent
attached to the player entity is not serialized correctly so pending tasks are not loaded correctly in a saved game.
The following error log shows the exact NPE. To replicate,
16:02:36.156 [main] INFO o.t.t.actions.PerformTaskNode - Perfoming Task of type : build
16:02:36.156 [main] INFO o.t.logic.behavior.core.ActionNode - Exception while running action org.terasology.taskSystem.actions.PerformTaskNode@75472842 from entity EntityRef{id = 3763, netId = 0, prefab = 'Oreons:OreonBuilder'}:
java.lang.NullPointerException: null
at org.terasology.taskSystem.actions.PerformTaskNode.removeColorFromArea(PerformTaskNode.java:144)
at org.terasology.taskSystem.actions.PerformTaskNode.modify(PerformTaskNode.java:115)
at org.terasology.logic.behavior.core.ActionNode.execute(ActionNode.java:78)
at org.terasology.logic.behavior.core.SequenceNode.execute(SequenceNode.java:56)
at org.terasology.logic.behavior.actions.LookupAction.modify(LookupAction.java:53)
at org.terasology.logic.behavior.core.ActionNode.execute(ActionNode.java:78)
at org.terasology.logic.behavior.core.DelegateNode.execute(DelegateNode.java:91)
at org.terasology.logic.behavior.DefaultBehaviorTreeRunner$1.execute(DefaultBehaviorTreeRunner.java:64)
at org.terasology.logic.behavior.core.DecoratorNode.runChild(DecoratorNode.java:76)
at org.terasology.logic.behavior.core.DecoratorNode.execute(DecoratorNode.java:89)
at org.terasology.logic.behavior.core.DelegateNode.execute(DelegateNode.java:91)
at org.terasology.logic.behavior.DefaultBehaviorTreeRunner$1.execute(DefaultBehaviorTreeRunner.java:64)
at org.terasology.logic.behavior.core.SelectorNode.execute(SelectorNode.java:52)
at org.terasology.logic.behavior.core.DelegateNode.execute(DelegateNode.java:91)
at org.terasology.logic.behavior.DefaultBehaviorTreeRunner$1.execute(DefaultBehaviorTreeRunner.java:64)
at org.terasology.logic.behavior.core.SequenceNode.execute(SequenceNode.java:56)
at org.terasology.logic.behavior.core.DelegateNode.execute(DelegateNode.java:91)
at org.terasology.logic.behavior.DefaultBehaviorTreeRunner$1.execute(DefaultBehaviorTreeRunner.java:64)
at org.terasology.logic.behavior.core.DynamicSelectorNode.execute(DynamicSelectorNode.java:54)
at org.terasology.logic.behavior.core.DelegateNode.execute(DelegateNode.java:91)
at org.terasology.logic.behavior.DefaultBehaviorTreeRunner$1.execute(DefaultBehaviorTreeRunner.java:64)
at org.terasology.logic.behavior.DefaultBehaviorTreeRunner.step(DefaultBehaviorTreeRunner.java:84)
at org.terasology.logic.behavior.Interpreter.tick(Interpreter.java:62)
at org.terasology.logic.behavior.BehaviorSystem.update(BehaviorSystem.java:105)
at org.terasology.engine.modes.StateIngame.update(StateIngame.java:171)
at org.terasology.engine.TerasologyEngine.tick(TerasologyEngine.java:458)
at org.terasology.engine.TerasologyEngine.mainLoop(TerasologyEngine.java:421)
at org.terasology.engine.TerasologyEngine.run(TerasologyEngine.java:397)
at org.terasology.engine.Terasology.main(Terasology.java:156)
Tabs within the Task Selection Screen are "Tasks" and "Buildings". When you click the "Plant" list item from the "Tasks" section screen, you move to another screen, the Plant Selection Screen, in which you can select which Plant you want to build.
I propose the merge of the Task Selection Screen and Plant Selection Screen. In more detail, change the tabs from "Tasks" and "Buildings" to --> "Plant", "Guard" and "Build", removing the Plant Selection Screen altogether.
Having a Task category within the Task screen is kind of unnecessary. The "Buildings" is a task itself as well, thus it puts it in the same category as "Plant" and "Guard".
plantSelectionScreen.ui
and plantScreen.skin
I am trying to figure out how MOO works. I have managed to place a portal, but cannot figure out how to spawn Oreons. Is there a player guide or quick tutorial I can view?
Block selection logic currently implemented here in the engine, does not work in multiplayer. The selected area is not rendered for other players connected to the server.
To remedy either modify the existing logic or implement a new block selection system in MOO.
The Oreon's attributes are currently altered in the PerformTaskNode
after the task is completed. This must be replaced with a AttributeSystem
which handles all changes to the attributes based on the task assigned in small, gradual steps while the Oreon is performing a task.
The presence of the Oreon King in an area should make the workers more efficient and vigilant
which in turn would reduce the time required for the concerned work to be completed. But,
the king should get tired fast due to all this ‘effort’ and must return to his lair to rest or increase his hunger level.
Resolving #32 would require implementing a system for attribute based task performance efficiency which can be used to resolve this too i.e. use the system to enhance attributes of the Oreons while the King is around.
Notifications to the player are currently sent as messages in the chat box using the ChatMessageEvent
. A new overlay for the village related notifications(in the top right corner maybe) should be implemented to avoid cluttering the player's chat box with messages from NPCs and MOO systems.
The Task selection screen currently lists all the tasks, that can be assigned to a single area, in a single overlay this should changed to tabbed layout for different categories of tasks into separate tabs.
Previous version of MOO used a tabbed layout for the menu based command system so this can be used as a reference. Files related to this layout can be found here(before any changes were made during the GSoC 2018 overhaul).
The color rendered for the area selection currently is chosen randomly, this should be changed to a particular color for each task for a better gameplay experience.
Colors can be:
When "activating" a block with the Building Upgrade Tool the BuildingUpgradeSystem
triggers the upgrade screen only if the block is part of a building.
New blocks that are added in the world after a building upgrade are not included in this list of block regions thus, activating these with the Upgrade Tool do not trigger the required screen.
The HoldingComponent
attached to the player has a list of constructed buildings which also consists of details about the bounding regions of these buildings. This list must be updated after each upgrade.
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.