Giter Club home page Giter Club logo

masteroforeon's Introduction

Master of Oreon World Manager Interface for Terasology

masteroforeon's People

Contributors

benjaminamos avatar cervator avatar darkweird avatar eviltak avatar hannahguo avatar jdrueckert avatar keturn avatar mkienenb avatar msteiger avatar naman-sopho avatar pollend avatar putawande avatar qwertygiy avatar ratmolerat avatar skaldarnar avatar spookynutz avatar stefaniamak avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

masteroforeon's Issues

Associate preview PNG images to list items

Summary

Original situation

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",

Desired situation

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.

About the UIImage

It has ID "selectionImage" and is located within the taskSelectionScreen.ui.

About the Assets

All assets can be tracked down through the PR #72. Each asset is named after the list item they represent.

Important note

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.

NPE before Oreon death

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)

Oreon attributes should affect the way they perform a task

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).

Debug Oreon spawn, and add resource based spawn from Portals

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 :

  • Currently for spawning MOO uses the SummonMinionMenuSystem from the Miniion module using the createMinion method from the class.
  • The menu system also lists out all the Oreons that can be spawned by filtering entities with MinionComponent.

No replication over the server for various component fields

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 :

  • HoldingComponent :
    • Queue<EntityRef> availableTasks
    • List<EntityRef> assignedAreas
    • List<EntityRef> constructedBuildings

HoldingComponent is not serialized correctly

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,

  • Start a new game and add a Task
  • Exit to main menu
  • Load the saved game and wait for the task to be finished by an Oreon.
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)

Merge of Task Selection Screen list and Plant Selection list

Summary

Current situation

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.

Proposed change

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.

Why?

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".

Changes that might be needed, other than the change of the Tabs

  • Add at least an item within the "Guard" option (I believe it went straight on building the guard when selected)
  • Change the "Buildings" label with a verb as well, could be something like "Build"
  • Delete plantSelectionScreen.ui and plantScreen.skin

Player guide or tutorial?

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 and rendering in multiplayer

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.

Changes to the Oreon's attributes should be gradual

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.

Implement behavior tree and new task for the Oreon King

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.

A different overlay for the notifications related to the village.

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.

Implement a tab layout for the task selection screen

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).

Remove the dependency on the deprecated Miniion module

As mentioned in the issue here, the Miniion module is now deprecated. MOO depends on Miniion for its TaskManagementSystem and the MinionAI system. The useful code related to the Task system in Miniion must be moved into MOO and the AI must be implemented to use the new behavior trees.

Render area selection color according to the task assigned

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:

  • Green -> Plant task
  • Brown -> Build task
  • Blue/Red -> Guard task etc.

New blocks added after building upgrade not included in building regions

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.

Oreons invisible in a saved game

The oreon mesh is not rendered when a saved game is loaded. Their name tags show up and they are able to procure tasks too. So the creatures are registered, they are just not rendered.
Screenshot from 2019-07-09 16-02-09

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.