Giter Club home page Giter Club logo

game-stages's Introduction

Game Stages

Game Stages provides a framework for creating modpack progression systems in Minecraft. These progression systems are built using stages which are named true/false flags which are stored on a per-player basis. Stages are not linear and have no implicit connection or dependency on each other.

Game stages only provides the framework for handling stage data. It saves the data, it synchronizes it with clients, and it provides commands that can be used to interact with the data. It does not alter game mechanics or interpret what stage flags are meant to do. This functionality is provided through Game Stage addon mods.

Addons

Other mods can hook into Game Stages and use a player's stage data to change how certain mechanics work. These addons and their mechanics provide the tools that modpack authors use to build their progression systems.

FaQ

How do I give players a stage?
This mod provides the /gamestage add @p stagename command which will give a player a stage. These commands can be used in command blocks, functions, advancements, signs, books, etc. Many mods will also allow you to run a command when a player does something. Keep in mind the @p is substituted to be the current player.

How do I stage a recipe/block/item?
Game Stages does not provide the actual progression mechanics. You will need to use addons such as ItemStages to do these things.

Maven Dependency

If you are using Gradle to manage your dependencies, add the following into your build.gradle file. Make sure to replace the version with the correct one. All versions can be viewed here.

repositories {

    maven {
    
        url 'https://maven.blamejared.com'
    }
}

dependencies {

    // compile fg.deobf("net.darkhax.gamestages:GameStages-1.16.5:7.1.2")
    compile fg.deobf("net.darkhax.gamestages:GameStages-MCVERSION:PUT_FILE_VERSION_HERE")
}

Jar Signing

As of January 11th 2021 officially published builds will be signed. You can validate the integrity of these builds by comparing their signatures with the public fingerprints.

Hash Fingerprint
MD5 12F89108EF8DCC223D6723275E87208F
SHA1 46D93AD2DC8ADED38A606D3C36A80CB33EFA69D1
SHA256 EBC4B1678BF90CDBDC4F01B18E6164394C10850BA6C4C748F0FA95F2CB083AE5

Sponsors

This project is sponsored by Nodecraft. Use code Darkhax for 30% off your first month of service!

game-stages's People

Contributors

artdude543 avatar buuz135 avatar cerus avatar cpw avatar darkhax avatar fitfc avatar jaredlll08 avatar jriwanek avatar lclc98 avatar lykrast avatar timeconqueror avatar xuyuere avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

game-stages's Issues

for loop not working correctly

I wrote this code., and in the chat it says

ERROR: stages\knowledge(2).zs:35 > No iterator with 1 variables
ERROR: stages\knowledge(2).zs:35 > No iterator with 1 variables
ERROR: stages\knowledge(2).zs:35 > No iterator with 1 variables

I read the docs, and I don't have any errors as I can see. Can you help me please?

[Question] In 2.0, GameStageHelper.hasStage/etc On Client Always Returns False

In testing, I've noticed that, when run on the client side, calling GameStageHelper.hasStage (and similar methods, without directly passing in an IStageData) will always return false - I assume this is because there are the client side specific methods, but I wanted to check if this was actually intended or not. This ultimately seems to be an issue that the local IStageData retrieved from GameStageSaveHandler, unless specifically accessed through GameStageSaveHandler.clientData, has no stages.

I've found this issue both:

This has been observed specifically with:

  • Forge 14.23.4.2703
  • GameStages 2.0.91

Sorry for the trouble; just wanted to double check. Thanks!

About repost

Hi Dear Darkhax,I'm a carrier and translator in mcbbs of China,we think your mods(GameStages and its addons)are important for us but we have trouble to download it from curse,so I want to carry it to mcbbs,and we will recommend the author is you and let other people download from curse first,do you agree?Hope your reply。

Add support (or config option) for vanilla tags

In 1.14.4+, entity.getTags(), entity.addTag() and entity.removeTag() exist. It would be great if there was, at least a config option to switch to that system

Edit: Seems like these have existed since 1.12 already. The only downside to vanilla tags is that it doesn't seem like they are synced to client by minecraft

computercraft turtle and buildcraft fakeplayer problem

To make the computercraft/cc: tweaked turtle do anything like breaking blocks, I asked the Dev of cc: tweaked for the fakeplayer ID. I gave [ComputerCraft] all Stages but its still not able to break any blocks. Same Problem with buildcraft quarrys. At startup the logs tell me that all stages has been loaded for [ComputerCraft]. So any clue what I am doing wrong or is this a bug? If you need more info, let me know and I'll post it here.

This is what my gameStagesFakePlayerData.json looks like:

[
{
"fakePlayerName" : "rftools_builder",
"stages": [ "zero", "one", "two", "three", "four", "five" ]
},
{
"fakePlayerName" : "rftools_elevator",
"stages": [ "zero", "one", "two", "three", "four", "five" ]
},
{
"fakePlayerName": "[IF]",
"stages": [ "zero", "one", "two", "three", "four", "five" ]
},
{
"fakePlayerName": "[ComputerCraft]",
"stages": [ "zero", "one", "two", "three", "four", "five" ]
},
{
"fakePlayerName": "[Buildcraft]",
"stages": [ "zero", "one", "two", "three", "four", "five" ]
},
{
"fakePlayerName": "[Mekanism]",
"stages": [ "zero", "one", "two", "three", "four", "five" ]
},
{
"fakePlayerName": "[Minecraft]",
"stages": [ "zero", "one", "two", "three", "four", "five" ]
},
{
"fakePlayerName": "[Modular Routers]",
"stages": [ "zero", "one", "two", "three", "four", "five" ]
}
]

[Suggestion] Add a way to add/remove stages for offline players.

I am managing a custom modpack for me and a group of my friends on a dedicated server that I am hosting. The way I have it set up, all of us should always have the same stages. However, since there is no way to manipulate the stages of offline players, this raises a problem. I am already using the command to progress through the stages anyway, so if you could add some way to give offline players stages by command, that would be great.

Trying to add GameStages as a soft dependency in IntelliJ

Hi,

Sorry this question is a bit off topic from your mod and is really a project setup issue, but I was hoping you would know.

I was recently requested to add GameStages integration to my mod - I followed the 1.12.2 instructions on your github to get it to compile GameStages. When I run Debug mode though through the IDE, it gives me a message that bookshelf is a required dependency. Is there any way to run debug mode without GameStages loading at all? I'd like to debug functionality for the mod without GameStages installed and do debugging with GameStages installed separately.

Crash during loadup

using forge 2611
minecraft 1.12.2
mod version 1.0.77
also using a lot of game stage addons: tinkers, mob, item, recipe, and time
crash report: here

Game Stages 2.0

The demands and needs of this API have changed a fair bit since it was originally released. To help adapt to these changes I am planning to release a 2.0 version of this mod which will address the compatibility and performance issues some people have run into. The purpose of this issue is to discuss the upcoming changes, and gather feedback for this release.

Notable Issues

  • You can't get a list of all the known stages. Makes things like #1 hard to implement.
  • Stage data re-syncs when the player respawns or changes dimensions, however there is no strict reason for this other than ensuring the capability is in sync.
  • Syncing on respawn and dimension change introduces a race condition where some addons can run before the sync takes place.
  • Lack of persistent global database, making things like fake players annoying to work with.
  • Several areas of the code in the main mod and addons will always fail for fake players due to strict checks.

Planned Changes

  • Move from player capabilities to a global system similar to the one in prestige. This will make it easier for TileEntities to act on behalf of their owners. It will also reduce the amount of syncing needed and eliminate a few race conditions.
  • Create a public facing class with static methods for doing simple things. Hopefully people will use this rather than the hacky solutions they have been using.

JEI Category GameStages Support

Feature request description

I'd like to request GameStages compatibility for the CraftTweaker function mods.jei.JEI.hideCategory(string category), in order to hide tabs that the player doesn't have access to, until the appropriate GameStage.
I imagine it would work like hideCategory, but with an addition string like so:

mods.jei.JEI.hideCategory(string stage, string category);

Feature request reason

  • This feature would most likely reduce player confusion in the early game for my upcoming pack, aswell as reduce the time players need to spend searching through JEI.

Feature request dependencies

  • JEI

Custom unlockable unlocks gamestage, but doesn't trigger orestages update

What

  1. Stage blocks using OreStages mod
  2. Create Reskillable unlockable to unlock ore stage
  3. Unlock Reskillable unlockable
  4. Notice "You have unlocked..." message
  5. Notice staged blocks aren't changed and no chunks are re-rendered

This happens in single player. Leaving the world and re-entering the world will display the staged blocks properly. Also, entering the command to add the stage does trigger the block change and the chunk update. Adding a different stage to the player does trigger the chunk update, but doesn't reveal the blocks.

Maybe the added stage isn't being synced to the client. I'm going to cross-post this in CompatSkills and GameStages. When PlayerDataHandler.getStageData(player).unlockStage(gameStage) is called, does GameStages sync the change with the client or is that the responsibility of the caller?

Reference

Versions

Forge: 14.23.2.2618
Reskillable-1.12.2-1.0.0
CompatSkills-1.12.2-1.0.0
GameStages-1.12.2-1.0.85
OreStages-1.12.2-1.0.26

issue using hasGamestage in zenscript

I'm try to run this zenscript with gamestages installed

import crafttweaker.player.IPlayer;
import crafttweaker.events.IEventManager;
import crafttweaker.event.PlayerChangedDimensionEvent;

events.onPlayerChangedDimension(function(event as crafttweaker.event.PlayerChangedDimensionEvent){

	if (!event.player.hasGameStage("one")){
	//do something
	}
	return;
});

`

crafttweaker reports correct syntax but when the game loads it errors out in the logs and does not work and crafttweaker throws this error:
https://hastebin.com/mevabicihu.pl

I'm wasnt sure if this was a CT issue or gamestage issue (or plain old user error) so Im submitting to both gits. (CraftTweaker/CraftTweaker#700)

  • Minecraft: 1.12.2
  • Forge: 14.23.5.2782
  • Crafttweaker: 4.1.13

Gamestage freeze/lag issue

when i claim a gamestage my game freezes/lags very bad. i dont know wat to do to fix this. after a while when the items get loaded the game returns to normal or it kicks me out of the single player game without a crash

[Feature Request] Expose GameStages on IPlayer

Hello!

I would love if there was a way to check the gamestages a player has. The purpose would be so that in an advanced recipe using recipe functions, I can do something like a .contains to check if the player has a certain stage, and adjust the output based on that information.

Thank you!

New pack Creation - Crashes

Greetings,

Installing the latest version of Game stages is crashing.

java.lang.NoClassDefFoundError: net/darkhax/gamestages/event/GameStageEvent$ClientSync

basically a fresh install of mods, complaining about stages not found. Have had to downgrade to 1.0.86, which has also forced a full downgrade of recipe stages to 1.0.8 - because the 1.1 and 1.1.1 of recipe stages require a V2+ verison of game stages.

Version 2.0.91

Crash Log:- https://pastebin.com/ZFFb8aLv

[Suggestion]Unlock stage as a reward in advancement

It would be a faster and better way to do that than creating functions in every save directory which just run one command giving a player the next stage.
It could look like this:

"rewards" : { "unlock_stage":"stage_name" }

Crash on loading an existing world.

When started Minecraft, everything was fine. Then I opened up a world I had previously created without gamestages. During the "Loading Terrain" part, it crashed. Here's my crash report:
crash

[Suggestion] JEI tie in for the various stages items

Sorry if this isn't the best place to add this, but I was wondering if it would be possible to try and create a tie into JEI such that you can do something like ">stage_one" and it would show all the items within that stage, if you've unlocked it. (I am basically asking this so that in the SevTech ages pack, it would be more readily apparent what's been unlocked by the later ages.)

Have a great day,

Greenking13

All Stages lost on Server login

Players will lost all their stages almost everytime login into the server. Is this a known issue and Is there any solution?

[1.12.2] Anvil rename can familiarise an unfamiliar item

Mod Version: GameStages-1.12.2-2.0.123.jar

Hey!

It seems that if you put an unfamiliar item inside of an anvil (if you are either given an unfamiliar item, or received one in any way), and change the name of the item, it'll output a brand new fresh item which can be used without any issue.

Is this intended?
Thanks!
image
image

Issues with AE2 autocrafting

I had updated Modern skyblock 3 and from 3.4.1.2 to 3.4.1.4 and the items that had originally been locked were unable to be crafted through AE2, though I could manually craft them. Uninstalled this mod, and despite now having to wait a ridiculously long time for my world to load, I was able to craft everything.

Fakeplayer

I should have mentioned before that I tried ComputerCraft as an alternative and it still didn't work.
I have the same problem with Buildcraft and I tried both spellings (Buildcraft and [Buildcraft]). The Quarry from Buildcraft can't destroy blocks either.

Originally posted by @Marekone in #47 (comment)

Server players lose their gamestages after log out

Versions

Mod version:

GameStages-1.12.2-2.0.115

Forge version:

14.23.5.2847

Singleplayer or Multiplayer:

Multiplayer, using Mohist

Installed mods:

https://paste.ubuntu.com/p/KHd4wGjgjS/

Link to full log

This is the latest.log generated by the server.
latest.log
You may focus on the user whose ID is Gastant, he has lost 1 stage for many times in this log.

Description of the problem

Every time a player logs out, he or she will find his gamestages are lost when he/she log in later.

I hope you could give me some help with this issue.
Is this issue related to the Minecraft server software I used?
Is GameStage mod working properly on other server software?
Thanks for your kind help in advance!

Can't resolve dependency due to certificate issue on maven

      > Could not resolve net.darkhax.gamestages:GameStages-1.12.2:1.0.80.
         > Could not get resource 'https://maven.mcmoddev.com/net/darkhax/gamestages/GameStages-1.12.2/1.0.80/GameStages-1.12.2-1.0.80.pom'.
            > Could not GET 'https://maven.mcmoddev.com/net/darkhax/gamestages/GameStages-1.12.2/1.0.80/GameStages-1.12.2-1.0.80.pom'.
               > hostname in certificate didn't match: <maven.mcmoddev.com> != <mcmoddev.com> OR <mcmoddev.com> OR <www.mcmoddev.com>

No rush though -- I'll use it without maven meanwhile.

Fabric

Please, make an update for 1.16 fabric

Fabric is a cute modloader with good optimization, better graphics and easier coding. Its already more popular than forge (cause sodium).

Maven Dependency Documentation Incorrect

Instructions for including gamestages and bookshelf dependencies have not been updated to reflect the new format in which it should be used. For example, in later versions of Minecraft, the following line:

compile "net.darkhax.gamestages:GameStages-MCVERSION:PUT_FILE_VERSION_HERE"

should instead be:

compile fg.deobf("net.darkhax.gamestages:GameStages-MCVERSION:PUT_FILE_VERSION_HERE")

otherwise the development environment crashes on run due to obfuscated mappings.

Game Stages cause JEI desyncs

Using GameStages 1.12.2-v1.2.1 with JEI 4.15.0.291 on Forge 14.23.5.2847.

When using Game Stages serious, consistent JEI desyncs can occur.

In detail: if I hit the + button on JEI to auto-insert items into any crafting grid they are inserted only on the server but not on the client, which not only makes further crafting impossible until the GUI is closed, but also causes heavy inventory desync issues. Sometimes just looking up a recipe (so without hitting +) is causing a desync and makes the crafting table unusable until the GUI is closed. I can't see a pattern here, but the issues happen very consistently, rendering JEI unusable.

This happens in singleplayer and LAN games. Switching between that sometimes cures the desync for a while.

Note: mezz/JustEnoughItems#1808

[Suggestion] Serene Seasons Plugin

I'm cross-referencing this as it might be of interest for both parties.

Adding a Serene Season compatibility (when also Tough as Nails is present) would enhance the modpack creation ecosystem with Quests\Adventures\Whatever to lock the player into a specific season (be it winter for instance) for improved (Hardcore)Questing.

Glitchfiend/SereneSeasons#53

jei recipe missing when add a stage to any player

When a player has no stage, jei will show all the recipes of the Metal Press (a multiblock structure in Immersive Engineering)
When a player is given a stage , jei will not show the recipes og the metal press.
What happened?

This is VEXATING ME!!!

Can SOMEONE explain to me what the bloody hell is Game Stages and HOW to see how I can unlock them?!?! Playing Skyfactory 4.

[Request] FTBLib Team Support

Would you be willing to support applying game stage to an FTB Lib team, if present, in addition to individual players? I'm working on a pack that is going to rely on GameStages heavily and I want to ensure that working in a team is as seamless in playing alone. The idea would be similar to QuestBook teams were the team progresses together and only one player needs to unlock a stage to unlock it for their team.

Thank you for your consideration.

Gamestages clearing saved stages when Soulus is present

Gamestages version: 2.0.115
Minecraft: 1.12.2
Forge: 14.23.5.2847
Modpack: Skyblock Billionaire

I've contacted the Soulus Dev about the issue as well. It seems that when Game Stages and Soulus are installed, it clears Game Stages data when a player disconnects.

This only occurs on a SERVER. It works fine in single player.

[23:18:57] [Server thread/INFO] [gamestages]: Saved 1 stages for The_Law_21.
[23:18:57] [Server thread/INFO] [gamestages]: Saved 2 stages for Spinkxy.
[23:18:57] [Server thread/INFO] [gamestages]: Saved 1 stages for LadyConfido.
[23:19:02] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: [EMPLOYEE]<The_Law_21>: ok, for reals, going to bed.
[23:19:05] [Server thread/INFO] [net.minecraft.network.NetHandlerPlayServer]: The_Law_21 lost connection: Disconnected
[23:19:05] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: The_Law_21 left the game
[23:19:05] [Server thread/INFO] [soulus]: Reloaded client-side configs.
[23:19:05] [Server thread/INFO] [soulus]: Reloaded configs.
[23:19:05] [Server thread/INFO] [soulus]: Synced configs to clients.
[23:19:05] [Server thread/INFO] [gamestages]: Saved 0 stages for The_Law_21.

You can see from the logs that stages are saved prior, (saved 1 stages for The_Law_21) but when I disconnect, it shows 0 stages saved, after running the soulus configs. Here is a synopsis from the Soulus dev on Discord:

"i don't think it has anything to do with soulus. i've removed everything from soulus that deals with gamestages and I can still repro."

PlayerDataHandler.IStageData#getUnlockedStages() returns empty collection on client

I recently updated gamestages from 1.0.76 to 1.0.78 and staged recipes stopped working in my mod, Artisan Worktables.

I narrowed the issue down to this call:

PlayerDataHandler.getStageData(player).getUnlockedStages()

On the server it returns a collection with the proper strings:
image

However, on the client:
image

I tested in the previous version I had, 1.0.76 and everything works as expected. After updating to 1.0.78 the issue began.

Please let me know if there is anything I can do to help, thanks!

Maven .pom dependency group ids have unintentional prefix?

I was updating my versions today and couldn't build with the latest gamestages because of a dependency that it couldn't find:

Could not find deobf.net.darkhax.bookshelf:Bookshelf-1.12.2:2.3.557.

It looks like from 2.0.101 to 2.0.106 all the .pom files have deobf. in front.

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.