you seem to be missing your module importation in main.
var roleFixer = require('role.fixer');
you seem to be missing your module importation in main.
var roleFixer = require('role.fixer');
My guess is, you have code looking like that somewhere:
if (creep.memory.role = 'builder')
instead of
if (creep.memory.role == 'builder')
I had some problems dealing with that too.
Here's what i did to keep it simple.
I save the room my creep is supposed to work in memory on spawn.
example: spawn.createCreep(body, "", { role: 'harvester', room: 'ABC12'});
I create a flag in the middle of every room i want to move in called exactly the same name as the room.
Then, before calling my creeps roles, i make them move to that flag if they're not in the correct room.
So the moment it steps into the right room, it starts doing it's job, doesn't matter where the "roomFlag" is.
[CODE]
if (creep.memory.room != creep.room.name)
{
var roomFlag = Game.flags[creep.memory.room];
if (roomFlag)
creep.moveTo(roomFlag);
}
else
{
switch (creep.memory.role)
{
case "miner": this.miner(creep); break;
case "carrier": this.carrier(creep); break;
case "upgrader": this.upgrader(creep); break;
case "transfer": this.transfer(creep); break;
case "retire": this.retire(creep); break;
case "repair": this.repair(creep); break;
case "builder": this.builder(creep); break;
case "reserver": actions.reserve(creep); break;
case "claimer": actions.claim(creep); break;
case "support": this.support(creep); break;
case "soldier": actions.fight(creep); break;
default : console.log(creep.name + " is a " + creep.memory.role + " in " + creep.room.name + " and it doesnt know what to do")
}
}
You make some good points Atavus.
I understand ressources are not the biggest factor, etc..
I'm mostly annoyed at advertisement vs reality.
I wouldn't have said a thing if they didn't strongly promote their game has no p2w.
Also, if the main purpose is to offer the game for free to players who want to share their ressources, they could easily do that without a P2W concept.
It doesn't have to be players who sells the sub tokens.
Have you read at all? Selling subscriptions is perfectly fine.
Subscriptions tokens that you sell in-game for ressources isn't. (if you promote that your game isn't P2W)
They promote that this game is skills only, no P2W here!
The steam store page says this:
"The subscription cost is the same for all players, there is no way to pay more to gain more advantages."
You can buy a sub token for real money, and then you can sell it in-game and get a huge amount of any ressources in exchange.
If two players are equally good at the game but one of them is rich in real-life, there's no question who wins.
It's as if i made this MMORPG and i sold imbalanced gear for real money saying: "Hey, the price of the gear is the same for all players, so there is no way to pay more to gain more advantages, this isn't a p2w game, i swear!"
Please remove this P2W feature, you're better than this.