Inactive Miniion

Chrisk

Music Weaver
Contributor
Art
Should I do an Oreo theme? If the oreo cookies are planned as a civilization, there should definitely be a theme for them :p
 

overdhose

Active Member
Contributor
Design
World
GUI
would be nice yeah. I don't know how you determine when to play what, let me know if I need to implement something to trigger the music.
 

overdhose

Active Member
Contributor
Design
World
GUI
Allright, with the radial menu at an acceptable level, I'm gonna redirect my attention to the miniions mod, to start I'm going to update the ui hopefully a last time (3 times a charm) to play a bit nicer with the radial, and really use the active minion ui more as a fixed part of the hud now that I don't need buttons on it anymore, you will activate the corresponding ui's from the radial instead.

Other big plans are an overhaul of the whole behaviour system, I'm going to use a command queue instead, minions will be able to send their own commands that way (like go eat when they are hungry) and at the same time implement events to trigger these, to be a bit more multiplayer ready. This will also enable you to queue multiple commands for the same minion. Paired with that will be a message system, so minions can inform you a bit of where they are goofing of to (or not tell you they are slacking off)
I will also include a very experimental option to use pathfinding hopefully.

That's a bit of the roadmap in my head, only when the overhaul is complete will I add / expand the functionality.
 

Josh

Member
Contributor
Hunter
Allright, with the radial menu at an acceptable level, I'm gonna redirect my attention to the miniions mod, to start I'm going to update the ui hopefully a last time (3 times a charm) to play a bit nicer with the radial, and really use the active minion ui more as a fixed part of the hud now that I don't need buttons on it anymore, you will activate the corresponding ui's from the radial instead.

Other big plans are an overhaul of the whole behaviour system, I'm going to use a command queue instead, minions will be able to send their own commands that way (like go eat when they are hungry) and at the same time implement events to trigger these, to be a bit more multiplayer ready. This will also enable you to queue multiple commands for the same minion. Paired with that will be a message system, so minions can inform you a bit of where they are goofing of to (or not tell you they are slacking off)
I will also include a very experimental option to use pathfinding hopefully.

That's a bit of the roadmap in my head, only when the overhaul is complete will I add / expand the functionality.
Sorry for not being active but, make sure you make a spot for stats on the new UI last UI there wasn't a spot for stats. Later today or something I'll talk with you on IRC.
 

overdhose

Active Member
Contributor
Design
World
GUI
there has always been a spot for stats, it just moved from the main screen to the sub menu with the other "minion dependant" commands
 

CTheRain

New Member
If you want to attract people the minions/citizens need personality, individual stats, and purpose. Similar to Dwarf Fortress. :)

"A very basic form of Dwarf Fortress is Gnomeria."
 

synopia

Member
Contributor
Architecture
GUI
Hey, sorry for answering this late.

The Miniion module was the the first one I looked into, when I started developing for Terasology. In Pathfinding module you will even find some classes or methods, that are more or less taken from the Miniions. My biggest problem with this module is, its not very extendable. As an example look into SimpleMinionAISystem. If you want to add new behaviors, you have to add some lines of code into this class. Also, this class needs to know many other classes/components (just look at the imports). I think, a different approach is to modularize the actual behavior of an entity into much smaller pieces of code (preferable into small classes). This is what I aim for with my behavior tree (BT) implementation.

Another issue is the actual implementation of moving minions. Currently a minion is basically a player and the AI sends something like key events to move. On the first sight this is a very promising approach (code to move an entity is reused for players and minions) and its already working (also in my behavior branch). But it has several flaws, first of all its a bit difficult to handle, because you never know exactly, if the current move is valid, if minion get stuck into ground or movement is blocked for what reason so ever. I am not sure about moving, but what I do know is, moving of entities should be completely independent of the AI code.

To cut a long story short, some of the features from Miniions module (Moving, Animation, Pathfinding and some more) can now be found in Pathfinding Module or my behavior branch. However, the BT is not ready to be pushed into develop branch - but you can play around with it if you want.

Now the thing is, how do we continue from here? I think, we should probably rewrite/modify the Miniion module to use BT + Pathfinding. Some classes from Miniions will be replaced by newer ones, that are located in the Pathfinding module right now (Moving and Animation - maybe others too). This stuff does not really fit into Pathfinding. But that is only my humble opinion. ;)
 

Mike Kienenberger

Active Member
Contributor
Architecture
GUI
It's already on the list to use BT + Pathfinding once those are available. Cervator and I have discussed that as a goal.

Yes, the implementation of what a minion does is pretty cool, but the modularization needs some work.

In fact, one of the first todo items I wrote when I understood how the Minion AI code worked was

-- modularize different behaviors

and my thoughts on movement were similar:

-- verify movement is separate from movement target, and provide modular movement behaviors

The AI system already is designed toward this, as it works primary with a movement target list rather than handling movement directly in task behaviors. My thoughts are that how an AI gets to its target should be a completely separate system from choosing a target. Some minions may fly in a straight line, some may jump over blocks, some may only be able to move on level ground, some may be able to swim, teleport, etc.

synopia,

I have tried to look at your Pathfinding and Behavior code a couple of different times, but I apparently have not found the right combinations of module and engine versions as I've never been able to get it working. I wasn't aware that you had Movement separated out, but that's another thing I will look at. If you could give me specific branches to try from your github repository, I'd appreciate it.
 

synopia

Member
Contributor
Architecture
GUI
I can try to write down, what I think should work, but I cannot prove it right now:

1. Checkout the BT branch https://github.com/synopia/Terasology/tree/behavior
2. ./gradlew fetchModulePathfinding
3. ./gradlew fetchModuleLightAndShadowResources
4. build & start Terasology

Since I am using the latest NUI branch, you will notice this and find a new menu entry in the main menu (Behavior Editor or something similar). Using this, you get the editor for the behavior trees and you can select the default tree (which right now does nothing useful). This is for testing purposes only, since the behavior tree needs the real Terasology engine running to operate (which of course does not in main menu).

So you need to create a new game with Pathfinding & LASR. Ingame press CAPS LOCK and you will see the editor again. Press ESC to exit. The first dropdown box is to select a tree. The second dropdown is to select and entity that currently operates the selected tree. That is empty, because you did not have any entity at all. So ESC back to game and spawn one using one of the scissor items (try all, the correct one will spawn your very first minion operating driven using BT. (Go back to editor, select the default tree and now the second dropdown has one entry with the entity. Select this and the tree will get some "annotations" showing the current state of the BT for the selected entity.

Of course you may edit the tree, too.

Notice: Everything is WIP. Do not build much code based on this stuff, since it may (will!) change. Otherwise you are forced to merge your stuff laters ;) Also we should talk about the branch. If you start using it (which I would appreciate), I cannot just force-push my commits (this will cause problems on your side, I suppose).

Maybe we should meet in IRC. Normally I am there from 7 pm CET up to midnight (sooooon :-D). My irc bouncer is running all the time, so just talk to me and I will reply when I log into my bouncer.

Edit - FYI: The BT implementation of the movement, as it is right now: https://github.com/Terasology/Pathfinding/blob/master/src/main/java/org/terasology/minion/move/MoveToNode.java
 

Mike Kienenberger

Active Member
Contributor
Architecture
GUI
I can try to write down, what I think should work, but I cannot prove it right now:
Thanks for explaining this. I'll make some notes on how it goes when I try it.

Notice: Everything is WIP. Do not build much code based on this stuff, since it may (will!) change. Otherwise you are forced to merge your stuff laters ;) Also we should talk about the branch. If you start using it (which I would appreciate), I cannot just force-push my commits (this will cause problems on your side, I suppose).
I can deal with merging and keeping up with your changes once I get familiar with the system, so don't worry about that.

Maybe we should meet in IRC. Normally I am there from 7 pm CET up to midnight (sooooon :-D). My irc bouncer is running all the time, so just talk to me and I will reply when I log into my bouncer.
That explains why I never see you. I am six hours behind you. When you are on IRC, I am working. When I am on IRC, you are sleeping. :) After I have worked with your systems and have a general idea of what they do, I will try to arrange my work schedule so I am available when you are so we can talk about things. It'll probably be on a Wednesday, so the 22nd is most likely.
 

Mike Kienenberger

Active Member
Contributor
Architecture
GUI
Crop growing works now, with more of the crop-specific behavior abstracted into the prefab.
I know there's some kind of crop module out there, but what's here could probably be abstracted into a crop module if that is not functional and generic.
 

Mike Kienenberger

Active Member
Contributor
Architecture
GUI
I think we should move the simple crop system out of Minions and into Crops.

I did the work to generalize it, and it works now with all of the fine crops that metouto provided.

It's certainly nothing as fancy like the tree growth system or the organic growth system other people have dug into, but it's a nice simple system that we can use with our current crop resources.

And it's one more step to modularizing what Minions does.

I'll go ahead and fork Crops and commit my changes to my local github.
 

msteiger

Active Member
Contributor
World
Architecture
Logistics
I'd greatly appreciate if the Crops module was updated. Now that basic terrain recognition works, we could try to place some farms in the countryside. Obviously, farms look better with crop fields around them.
So please let me know when there's news about that :)

Similary, I wonder if there could be synergy effects if we could glue the Cities module with Pathfinding/Miniions. Maybe the AI could be instructed to go to the forest closeby to collect some birch wood?
 

Mike Kienenberger

Active Member
Contributor
Architecture
GUI
The mkienenb/Crops system is on github. You place a crop block, and it will automatically grow until done.
The configuration is all in the prefabs. Right now, each stage grows at the same pace, but now that I see how to specify maps in the prefabs, I will probably change that to be a per-stage delay between changes.

Currenty the timing is rather quick (30 game seconds?) to prevent me from being bored while testing.
 

msteiger

Active Member
Contributor
World
Architecture
Logistics
Nice - so I can just put Crops:Corn blocks on the terrain and it will work? What's keeping you from pushing to Terasology/Crops?
Will try that out asap (probably next week) - nice job!
 

Mike Kienenberger

Active Member
Contributor
Architecture
GUI
Nice - so I can just put Crops:Corn blocks on the terrain and it will work?
EDIT: forgot to answer this question at first.

Yes, just put Crops:corn1 or Crops:squash4 or Miniions:OreonPlant0 or City:somethingX and it will automatically update.

What's keeping you from pushing to Terasology/Crops?
Technically, no permissions yet :)

But I haven't submitted a PR for a few reasons.

1) I wasn't sure we wanted to add behavior to the plants / crops module.

2) I wanted to support different intervals between changing block animations

3) I realized yesterday that the CropSystem was really a BlockAnimation system. It might already exist somewhere else. If it doesn't, it should go either into Core or into a BlockAnimation module. This also takes care of 1)

4) Too busy getting Minions in general supported by engine.
 

Mike Kienenberger

Active Member
Contributor
Architecture
GUI
Minions is now fully supported by the engine again (Thanks, Cervator, for the last second change), and I have merged my minions branch back into main branch. Crops won't grow unless you have Crops 0.2.0 from my repo, but the non-asset part of that needs to be redone. Crafting hasn't been tested at all, so that's probably broken. Lots of little things to do, but the "fun" factor is there.

Steps I used for testing the porting of the module were:
  1. Make sure blank cards are not in toolbar.
  2. Open the purple book
  3. Drag blank cards to book slot.
  4. Choosing some minions to create full cards
  5. Spawn a minion by activating a full card
  6. Select a zone with the zone tool (stick) by selecting a start and end block -- selection disappears after picked, I want to fix that next.
  7. Open the green book.
  8. Assign the currently-selected zone as OreonFarm zone type and save.
  9. Activate the minion command tool (skull staff) and drag to the window in the upper-right to make it stick.
  10. Pick the OreonFarm zone for the minion in the middle lower arrow popup.
  11. Pick the "Work" action for the minion in the right lower arrow popup.
  12. Sit back and watch the minion first terraform the ground, then plant stuff.
 

msteiger

Active Member
Contributor
World
Architecture
Logistics
Thank you for the explanation. I was able to reproduce all the steps except for the last one. Sitting back worked fine ;) , but the minions didn't start working.

I placed that in a "FlatWorldGenerator" world on the ground, but they were 1 block up in the air. A walking animation was running, but they didn't move - like they were stuck in thin air.
Digging the ground below them made them fall down until 1 block above ground, just as before.

Let me know, if I can help you with the debugging.
 
Top