Rellimarual Posted May 6, 2017 Share Posted May 6, 2017 I'm relatively new to using the console and I want to count the number of a prefab in the world. When I enter the command "c_countprefabs("prefab")" where does the response print? I'm not seeing it on my game screen. This is on a dedicated server. Link to comment Share on other sites More sharing options...
CarlZalph Posted May 6, 2017 Share Posted May 6, 2017 12 minutes ago, Rellimarual said: where does the response print? I'm not seeing it on my game screen. This is on a dedicated server. It prints on the server's console and in the server's server_log.txt file. If you're just printing out small things, then you can use your player's talker component to network it so you can quickly see it: ThePlayer.components.talker:Say(tostring(c_countprefabs("prefab"))) Link to comment Share on other sites More sharing options...
Rellimarual Posted May 6, 2017 Author Share Posted May 6, 2017 I don't seem to have access to the server's console, since it's rented, but I'll try the talker component. Thanks! Link to comment Share on other sites More sharing options...
Rellimarual Posted June 16, 2017 Author Share Posted June 16, 2017 This used to work and now no longer does. Were changes made to console commands? Link to comment Share on other sites More sharing options...
Daniel86268 Posted June 16, 2017 Share Posted June 16, 2017 Afaik there were no recent changes. Did you paste the command in? If yes, did you make sure that you still had the "Remote:" in front? Otherwise you just executed it clientside which doesn't do much. Link to comment Share on other sites More sharing options...
Rellimarual Posted June 17, 2017 Author Share Posted June 17, 2017 I'm not sure about whether "Remote" was in effect. I'll doublecheck next time I play. The command does get the character to speak , but it returns a number (0) that I know is inaccurate. Link to comment Share on other sites More sharing options...
Daniel86268 Posted June 17, 2017 Share Posted June 17, 2017 Make sure you spelled the prefab correctly as well. Some prefabs also have a pretty weird naming, so make sure you get that one right as well. Link to comment Share on other sites More sharing options...
Rellimarual Posted June 17, 2017 Author Share Posted June 17, 2017 I'm just cutting and pasting, which is why it was so confusing that it worked perfectly a few times then not: I'd cut and pasted the same text. But if the console is in the wrong mode that might explain it. What changed was the server I'd used it on. Link to comment Share on other sites More sharing options...
Daniel86268 Posted June 17, 2017 Share Posted June 17, 2017 With different server you mean dedicated vs local hosted one? Because that would make sense since I think local hosted servers don't have that remote one, so pasting it wouldn't trigger it with ctrl. Link to comment Share on other sites More sharing options...
Rellimarual Posted June 17, 2017 Author Share Posted June 17, 2017 No, I meant different dedicated servers. I was logging into various unpassworded servers looking for one with four walrus camps. Link to comment Share on other sites More sharing options...
Daniel86268 Posted June 17, 2017 Share Posted June 17, 2017 I wouldn't have expected that you'd be able to use commands like that on servers without being owner or admin. (Unless configured otherwise.) Link to comment Share on other sites More sharing options...
Rellimarual Posted June 17, 2017 Author Share Posted June 17, 2017 Huh. Well, I WAS able to use it on one, but then after that I used it to generate a four-Tusk world on my own server, so maybe that first open server I tried it on had somehow enabled regular players to use admin-level console commands? Link to comment Share on other sites More sharing options...
Daniel86268 Posted June 17, 2017 Share Posted June 17, 2017 That's what I'd assume, since console commands are usually admin only. (Which kinda makes sense.) Not sure why or how you'd enable console commands for all users. I guess there are reasons and ways to do it. Maybe that one even was a server someone set up to play with friends and wanted all of them to have access to console commands and was too lazy to add them all as admins. (And forgot to set a Pw) Link to comment Share on other sites More sharing options...
Electroely Posted June 17, 2017 Share Posted June 17, 2017 50 minutes ago, Rellimarual said: Huh. Well, I WAS able to use it on one, but then after that I used it to generate a four-Tusk world on my own server, so maybe that first open server I tried it on had somehow enabled regular players to use admin-level console commands? While the command will tell you a number, it won't be the actual number of walrus worlds in the world. It only counts loaded entities. Link to comment Share on other sites More sharing options...
Rellimarual Posted June 17, 2017 Author Share Posted June 17, 2017 3 minutes ago, Electroely said: While the command will tell you a number, it won't be the actual number of walrus worlds in the world. It only counts loaded entities. I *swear* I got this to work just fine on the dedicated server I rent. I started several worlds because I didn't want to invest in a one-Tusk map, and I got numbers ranging from 1 to 4. Recently on a public server I tried it while standing right next to the camp and got 0. Link to comment Share on other sites More sharing options...
Daniel86268 Posted June 17, 2017 Share Posted June 17, 2017 10 minutes ago, Electroely said: While the command will tell you a number, it won't be the actual number of walrus worlds in the world. It only counts loaded entities. As admin on a server you CAN use this command to count all entities in the entire map. As non-admin player you probably just get a 0 just like the boolean false aka nope, you can't execute this command. Link to comment Share on other sites More sharing options...
Electroely Posted June 17, 2017 Share Posted June 17, 2017 9 hours ago, Daniel86268 said: As admin on a server you CAN use this command to count all entities in the entire map. As non-admin player you probably just get a 0 just like the boolean false aka nope, you can't execute this command. Sorry, I wasn't specific enough. It only counts loaded entities when ran as a non-admin. Link to comment Share on other sites More sharing options...
Daniel86268 Posted June 17, 2017 Share Posted June 17, 2017 Just now, Electroely said: Sorry, I wasn't specific enough. It only counts loaded entities when ran as a non-admin. That makes sense. So I guess it's executed clientside then and the client just lists all available/loaded prefabs. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.