Navigation

    forum

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

    Topics created by Calfa

    • Screeps, guía en español (Spanish Screeps Guide)
      General Discussion • • Calfa

      3
      3
      Posts
      12463
      Views

      It would be a pleasure for me to do that. I like translating. This guide i did was just a bunch of relevant information i thought would be useful to know for anyone thinking about buying Screeps, and also for anyone wondering how to play. However, to do a proper "official" guide i should be given a bunch of texts to translate. A good idea would be to also translate the official docs web, which is a lot of stuff but still it'd be a pleasure. Count on me if you devs want to do it.
    • Unsolved Local Server Stops from time to time
      Help • • Calfa

      6
      6
      Posts
      7758
      Views

      Oh you have the redis tutorial, that is only the setup for the database/queue not the actual screeps server. Now you have to tell the screeps server to use that instead of the inbuild stuff... But be sure you have both the redis and mongo db running before you try that. And backup your data! For the steam client it is far simpler to use the workshop mod: Mongo DB mod <- seems to be broken use args github mod Use those instructions. (be sure to download the msi installer not the zips) You can get rid of Ubuntu after that, that thing is bloated nowadays too I don't think you have use for it.
    • Solved Local server - Insane amounts of dropped energy
      Technical Issues and Bugs • • Calfa

      6
      6
      Posts
      6592
      Views

      @tigga @MrFaul Thanks guys, i didn't know that and thought it was just some kind of bug.
    • Unsolved My code for unloading energy is very inefficient. Can i have some help, please?
      Help • • Calfa

      6
      6
      Posts
      7705
      Views

      @calfa thatll definitely record the CPU usage for each time its run so once for each creep. Over the last few months Ive been rewritting my code over and over again in simulation so idk how many rooms I can really work in
    • Allow to destroy owned structures in abandoned rooms
      Feature Requests • • Calfa

      3
      3
      Posts
      3836
      Views

      Dismantling them or reclaiming the room and dealing with them in one tick is best. If there are things such as terminals or spawns in there it can be a hassle later.
    • Unsolved How can i store all my extensions/spawns in order?
      Help • • Calfa

      18
      18
      Posts
      18327
      Views

      I got something! Tomorrow i'll try my refiller to follow this route to see what happens, but in the meantime i'd like to show you what i came up with let roleRouter = { run: function(creep){ //Initialize Route if(!creep.memory.route){ creep.memory.route = []; } //Number of structures added to the route if(!creep.memory.currentStructures){ creep.memory.currentStructures = 0; } //Get number of extensions + spawns if(!creep.memory.totalStructures){ creep.memory.totalStructures = creep.room.find(FIND_MY_STRUCTURES, { filter: function(s){ return (s.structureType == STRUCTURE_SPAWN || s.structureType == STRUCTURE_EXTENSION); } }).length; } //If i haven't added to the route as many elements as spawns + extensions if(creep.memory.currentStructures < creep.memory.totalStructures) { //Look for a structure not added to the route yet let nextStructure = creep.pos.findClosestByPath(FIND_MY_STRUCTURES, { filter: function(s){ return ((s.structureType == STRUCTURE_SPAWN || s.structureType == STRUCTURE_EXTENSION) && !_.includes(creep.memory.route, s.id)); } }); if(nextStructure){ //add structure to the route creep.memory.route.push(nextStructure.id); creep.memory.currentStructures ++; //Now if i'm not near to the structure above, move towards it if(!creep.pos.isNearTo(nextStructure)){ creep.travelTo(nextStructure); } //And now that i'm next to it... if(creep.pos.isNearTo(nextStructure)){ //Look for nearby structures that are not included yet let nearbyStructures = creep.pos.findInRange(FIND_MY_STRUCTURES, 1, { filter: function(s){ return (s.structureType == STRUCTURE_SPAWN || s.structureType == STRUCTURE_EXTENSION) && !_.includes(creep.memory.route, s.id); } }); //And now add these structures to the route if(nearbyStructures && nearbyStructures.length > 0){ for(let i in nearbyStructures){ creep.memory.route.push(nearbyStructures[i].id); creep.memory.currentStructures ++; } } } }else{ console.log('You are fucked!'); } //If the route is complete, store it in the room's memory }else{ creep.room.memory.route = creep.memory.route; } } } module.exports = roleRouter; So far, there's no errors and the number of elements in the route is 41 (40 extensions and 1 spawn) so it looks like a pretty good start.
    • Solved My code doesn't flow as intended
      Help • • Calfa

      3
      3
      Posts
      3909
      Views

      @w4rl0ck Oh! Then it must be this. I used "console.log()" in different places and the code flows in the order i expected. The only reason i see is what you say. I also wondered about making a list (someone suggested me to do a Spawn Queue) but i din't see how. What i'm going to do while i investigate on how to do that spawn queue is to set the room as isSpawning, so when the code gets to the part that controls creeps depending on flags is not allowed to spawn another one. Thank you so much!!! EDIT: It's fixed!!! Thank you again!!
    • Solved Can i include a function call into a filter?
      Help • • Calfa

      5
      5
      Posts
      6115
      Views

      @flyasd1 i love you! Thank you so much! I've been trying o google it for a while, but didn't even know how to do the search.
    • Solved Trying to create creeps in a more dynamic way
      Help • • Calfa

      10
      10
      Posts
      14581
      Views

      @mrfaul If i had money and lived in Germany i'd hire you as my teacher I didn't realize you were talking about my own limit of 20 parts, but that was just an example. I don't even have a creep role called "hauler". Before i created that system to spawn creeps i was defining their bodies by switching available energy in the room and depending on the result, deciding what creep i was going to create. I had about 6 or 7 defined bodies for each role with different costs. Now i'm thinking that creating always the biggest possible creep (except for miners) is not the best idea, and this is what i'm on now. Thanks again for sharing so much wisdom!! Will be back soon with more doubts hahaha probably before the end of the night
    • Solved Can i use someone else's "say" messages to trigger stuff?
      Help • • Calfa

      5
      5
      Posts
      5789
      Views

      @mrfaul hahhaha i don't know what that creeps does, but my neighbour asked me to open the rampart, so i made it public xDD Thanksssss a lot for that snippet!! It's just a few lines but i'm reading and reading it, trying to understand everything and how it does. Really really appreciate it!!
    • Solved Can't use findInRange and filter?
      Help • • Calfa

      4
      4
      Posts
      4900
      Views

      Works like a charm! Thank you guys!
    • Unsolved 2 links transfer energy to a 3rd link. Both have cooldown.
      Technical Issues and Bugs • • Calfa

      7
      7
      Posts
      6729
      Views

      @semperrabbit ohh! so i should make a link transfer queue, or just pray so they don't do it the same tick hehe
    • Solved How to flee from an enemy
      Help • • Calfa

      3
      3
      Posts
      6757
      Views

      You should look on the PathFinder. This is easy way to create flee behavior. This is shor example how you can use it. The enemys - this is array of enemy creeps, creep is your creep. let path = PathFinder.search(creep.pos, enemys.map(c=>{return{pos:c.pos,range:3}},{flee:true}).path creep.moveByPath(path) You can found more options in the documentation: https://docs.screeps.com/api/#PathFinder
    • Solved External Editor
      Help • • Calfa

      8
      8
      Posts
      16876
      Views

      @calfa Grunt is a program that runs JS code to automate for example compiling and deploying. I haven't found it on Chocolatey but you can install it via NPM (npm install -g grunt-cli). I haven't worked with Grunt yet so I can't tell you very much about it.
    • Keep code folded
      Feature Requests • • Calfa

      2
      2
      Posts
      3110
      Views

      Try Alt+0 / Alt+Shift+0 hotkeys. Tip: you can use almost all hotkeys listed here: https://ace.c9.io/demo/keyboard_shortcuts.html
    • Solved Is there a way to detect enemies in a room i don't own?
      Help • • Calfa

      6
      6
      Posts
      9907
      Views

      Hi again, and thanks to all of you for your help!! Finally i did something similar to what @JBYoshi and @Famine said, and it works pretty well. Thanks again!!
    • Unsolved I need some help finding the nearest room
      Help • • Calfa

      2
      2
      Posts
      5427
      Views

      I think you can change Game.map.getRoomLinearDistance on Game.map.findRoute(flag.pos.roomName, Game.rooms[i].name). So you will found nearest room by path, not a range. Because some time nearest rooms have very long path to travel between those rooms.
    • Color Blind Mode :D
      Feature Requests • • Calfa

      9
      9
      Posts
      9573
      Views

      @keenathar Deuteranopist here (Green color blind, and sorry if i misswrote it, i'm spanish xD) I can't tell the difference between the first and the third. For me they are exactly the same A setting we could tweak that'd set different colors depending on our color blindness would be fantastic. A pop-up when we hover with the name of the color so we can then use the proper constant would be enough imo, tho. Thanks for your efforts!
    • Solved Need some help with "hauler" logic
      Help • • Calfa

      6
      6
      Posts
      8024
      Views

      @duckymirror What i do is create the biggest possible body part for every creep depending on the available energy at the moment to spawn the creep. Will think about your way to implement it, tho. About towers and creeps...i know it's terrible, but it was just a way to protect myself against invaders, since i've never been involved in a pvp skirmish. The reason i do it this way is because once the invader has finished killing all my creeps, in case i can't defend, it will despawn. However, if there's a tower defending the house, my room will only lose a few ticks due to the freezing. I know it's still a terrible approach for pvp and even for pve, so i'll try to write a different behaviour. So far i thought about making all minions out of the tower scout range to enter in Panic Mode and then go to the tower, but this is still a PvE approach. Thank you!!
    • Solved I don't understand why i get this error
      Help • • Calfa

      3
      3
      Posts
      6127
      Views

      @starwar15432 Didn't think about that! I knew how to solve, because the error itself told me how to, but dindn't know why was happening. Thanks a lot!!