Navigation

    forum

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    1. Home
    2. Donatzor
    3. Posts
    • Flag Profile
    • block_user
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups
    • Blog

    Posts made by Donatzor

    • RE: Nooby issues trying to get my creeps to move by a path written to memory

      Greetings,

      Even without a generated error, functions in screeps will return an ERR_ code or an OK when run, this assists in the debugging process. So your creep.moveByPath(Memory.sourcePath1) should be returning a code other than OK.

      https://docs.screeps.com/api/#Creep.moveByPath has a table showing all the codes that can return, and what they mean.

      My guess is that you are calling Memory.sourcePath1 instead of creep.memory.sp1 * because from the first code, it looks like you set the paths to the creep's memory, not just the Memory object itself (unless you've done this somewhere not displayed in your post)

      As a side note, if the creep does not start on/adj to a step on your path (depending on how your path was generated) then you will likely get ERR_NOT_FOUND as they moveByPath() fails to find where it is on the path.

      Would recommend checking out Screep's Discord server, its a bit more dynamic and faster to get assistance, normally some one around can help in #world-help.

      If you don't like discord, would recommend checking out:

      https://docs.screeps.com/debugging.html

      https://wiki.screepspl.us/index.php/Basic_debugging

      https://wiki.screepspl.us/index.php/A_brief_guide_to_reading_the_Screeps:World_API_Documentation

      posted in Help
      Donatzor
    • RE: Question attacking hostile creeps

      a .find() will return an array see https://docs.screeps.com/api/#Room.find

      while .attack() requires an object (specificlly, a Creep, Structure, or PowerCreep) to be passed to it https://docs.screeps.com/api/#Creep.attack

      Need to select one-target from the array, I am surprised though that the creep was moving towards it, as moveTo() should also require a specific target.

      Side note, a find call would return an empty array if nothing was found, so your first if would still clear even with no targets. Need to check .length or other methods to determine targets exist.

      Would recommend https://wiki.screepspl.us/index.php/A_brief_guide_to_reading_the_Screeps:World_API_Documentation and also checking out the Discord as its a bit faster / more dynamic to get feedback and answers to questions.

      posted in Help
      Donatzor
    • RE: Memory resets every tick in simulation

      Hm. I am not sure, Sim does react differently then the MMO or private server does, but not quite to that degree I thought, would try this on the MMO or a private server and see if you get the same result

      posted in Help
      Donatzor
    • RE: Memory resets every tick in simulation

      I would presume that Memory.firstSpawnId != Game.spawns['Spawn1'].id is failing you somehow as it shouldn't execute if false. Would instead simply try checking if firstSpawnId exists, then not run your setup code if that's the case. Or alternatively, set a boolean like you have with newgame in Memory and check for that, if its there, return early out of the function (no need to do any further checks)

      Would also highly recommend checking out screep's discord, more dynamic help.

      posted in Help
      Donatzor
    • RE: findClosestByPath returns an object, but can't find the path

      Looks like Marvin was helping you out on the discord, so assume that's the same challange you were having.

      @Tobyers findClosestByPath returns one object from a find constant search or an array of objects, whatever object is closest by all resulting paths searched to all objects. Your likely thinking of room.find() which returns an array, which then you have to pick one object from it.

      posted in Help
      Donatzor
    • RE: New "Prioritize" setting for construction sites?

      Ah. Then the forums are indeed the best resource indeed.

      posted in Feature Requests
      Donatzor
    • RE: New "Prioritize" setting for construction sites?

      Well, as mentioned the #World-Help section of the discord is a pretty dynamic/active place to get assistance with learning the ropes.

      posted in Feature Requests
      Donatzor
    • RE: New "Prioritize" setting for construction sites?

      This is all quite achievable though code, when your creep is searching for / selecting a construction site (or the manager you've created to assign goals to creeps) you can prioritize/filter/arrange the data in any manner that you'd like. I suppose, feature wise UI you 'could' do it where it reassigns the Game.constructionsites object for the selected construction site to be first in the array, but not sure how feasible that is, and that may not work for everyone.

      Some quick examples, is when your builder creep is selecting/getting assigned a construction site, you can first check to see if any towers or specific types of buildings are in the array/object then if they are, use that element and ignore the rest, if not, then proceed with whatever.

      I'd highly recommend checking out the World:Help section of the Screep's Discord, folks are normally very helpful and its a bit more dynamic/faster than the forums.

      posted in Feature Requests
      Donatzor
    • RE: Picking up dropped energy

      As far as I am aware, you can not aggregate find calls in this manner, the parameter for the find accepts ONE OF the find constants, not multiple.

      From the API: One of the FIND_* constants.

      You can look at the engine code for it here as well (for private servers but likely how it operations on the MMO as well) https://github.com/screeps/engine/blob/master/src/game/rooms.js#L584

      If you want to link the results of multiple find calls into one aggerate array you can combine the two arrays or spread the find calls out over one array, then find as you see fit.

      For example you can use the spread operator with two calls to have one array let sources = [ ...creep.room.find(FIND_TOMBSTONES), ...creep.room.find(FIND_DROPPED_RESOURCES)]

      Which should result in one array, with objects from both find calls. You can read about the spread syntax here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax

      To be clear as well, for dropped resources you use pickup to gather the energy so even if it was finding dropped resources, harvest/withdraw would not apply (see API: https://docs.screeps.com/api/#Creep.pickup)

      Hope that helps, elsewise would highly suggest that you check out the Screep's discord. Its a little more dynamic than the forums for finding solutions / requesting code assistance.

      posted in General Discussion
      Donatzor
    • RE: cpu.getUsed() negative result?

      Perhaps I'm missing it, but I don't see where you have this in your code, I don't see it in your main, main ops, utils or other locations on the github you provided.

      Its also unlikely you should be getting over ~500 as a result from any getUsed() I'd presume do to you should be cut off at that point. Is it possible you are storing your cpuUsed/cpuStart over multiple ticks in the heap? For example, if you declare before your main runs cpuStart and use it over multiple ticks and/or also adding/subtracting to it somewhere if the ref is still live?

      posted in Technical Issues and Bugs
      Donatzor
    • RE: energyStructures option for renewCreep

      looking at the API and engine it seems that nothing to that effect was implemented into the system (no opt/options in the engine and/or API)

      posted in Feature Requests
      Donatzor
    • RE: Can't Find Error.

      Good evening (or morning)

      What error exactly? I don't see one posted in your question.

      Also, would highly recommend joining the Discord for Screeps there's a #world-help section that folks help people out in. Its a bit more dynamic and faster responses than the forums.

      I would say elif may be causing the issue if your doing JavaScript I'm not sure that works off-hand, looks like its a short for else if in python? Some people do play in python, there's a channel dedicated to it in the discord as well.

      posted in Help
      Donatzor
    • RE: Quiting screeps

      Apologies, never heard about / had any experiences like your describing with the game. To my understanding its meant to be a sandbox/MMO where content is added throughout its lifespan and new things to do which is why it doesn't have a set end-goal and generally people make the goals up themselves and feel they've accomplished them on their own time. I'd say if you feel your done with the game, then you've reached the goal for you.

      If you've not loaded the game, connected to the website or, anything beyond the forums here, may be something else causing the issues. Sadly, no idea you'd know best your situation of course. If such sounds, feelings or sensations are happening even when your computer is off, may want to seek medical assistance, or get a second opinion from a friend or family member on the problem. Not sure anyone on the forums here will be able to help much from the sound of it, can't see / hear what's happening on your end.

      posted in General Discussion
      Donatzor
    • RE: Quiting screeps

      Sorry to hear your havin' trouble.

      If you mean you are getting notifications from structures being dismantled/attacked or other such stuff you can disable notifications on the account page here: https://screeps.com/a/#!/account and under notifications should have a 'notifications enabled' option you can disable.

      If its something else, can send a support ticket here, I forget if they can delete an account entirely (thus no code to run server side or account) but can always ask. https://support.screeps.com/hc/en-us/requests/new

      Just remember it is a small team so depending on the issue could take some time to get a response.

      Closest thing I've found to touch from searching is https://en.wikipedia.org/wiki/Touch_(command) but I have not heard/don't know about that applying to Screeps.

      If you feel your personal bank account information is compromised, you should take that up with your bank.

      posted in General Discussion
      Donatzor
    • RE: Slack workspace deleted?

      Just tried logging back in, looks like it exists again!

      posted in General Discussion
      Donatzor
    • RE: Slack workspace deleted?

      Ah, that explains why my phone wants me to log-in.

      posted in General Discussion
      Donatzor
    • RE: StructureContainer not inheriting Structure properties in ScreepsArena (Alpha)

      This is mainly the forum for Screeps:World (The MMO/sandbox ver) currently alpha feedback/bugs have been posted on the Steam forums for the game: https://steamcommunity.com/app/1137320/discussions

      It shouldn't have a capacity, on the docs that's intended to show that it has a storage capacity of 2000, not that it has a property named capacity. All storage related things are done though .store https://steamcommunity.com/sharedfiles/filedetails/?id=2505541950

      To get a capacity code-wise you'd use getCapcity(RESOURCE_CONSTANT) off of store.

      Normally containers are considered neutral objects (though in Arena they seem to extend off an owned structure) so my should be false, and they as far as I know, should have hits.

      posted in Technical Issues and Bugs
      Donatzor
    • RE: Create multiple sectors on server

      https://github.com/ScreepsMods/screepsmod-map-tool

      posted in Private servers
      Donatzor
    • RE: inconsistent STRUCTURE_WALL object returned repeatedly

      the hits property is undefined for walls that are 'invincible' aka server-op placed. These are commonly placed around respawn/new-spawn zones to divide the outside MMO and the inside zone for a time before they are removed (when the time for the zone elapses) they've also been used to block portals in a similar fashion when new shards were introduced.

      Docs wise, https://docs.screeps.com/api/#StructureWall should say in the description details as well.

      posted in Technical Issues and Bugs
      Donatzor