Author Topic: Wait, I can't organize my files or script in-game anymore??  (Read 3217 times)

Quote
Resoure manager will no longer recognize files outside of the default directory structure
WHY.


GOD. WHY.

It was so nice being able to put important folders in the top directory. And prototyping was so convenient: exec("code/this.cs");
So now I need to (EDIT) stuff all my files into default folders instead of using a directory for each project? thanks.

The whole goddamn thing is freaks out when the sizes of any of the files in the .zip change, and nothing can be run outside of a .zip anymore (edit: unless it's somewhere like the screenshots folder). SWEET. That effectively precludes running a server and updating it without shutting it down (edit: unless I edit the project from, say, base/lighting). That's like biscuits and gravy for scripter-hosts like myself.
« Last Edit: March 20, 2009, 03:23:04 AM by Mr. Wallet »


Yea, bummer D:

It would be possible to make a small function that automatically starts at the chosen directory, prefixing the "add-ons/code/" to the string then execing.



This does remind me of an idea though, would it be possible to have everything that is downloaded be downloaded to a file like "add-ons/downloaded/weapon_crap/file.dts"?  It would be allot nicer then have all those crap add-on folders in the default add-on folder.

I just want to know why crap has to be in the a default folder (or an add-ons subdirectory) to be run. It's not like a host can do anything malicious outside of the add-ons folder without writing a new file out there (which, I've confirmed, is still possible from code in an add-on .zip).
« Last Edit: March 20, 2009, 03:23:33 AM by Mr. Wallet »

Because it makes addons have to be packaged in a more sane way. But you're right it makes it a lot more painful to develop.

In that case, just add a flag (default "on") that enforces this new system, or a command line thing to turn off the restriction, or something. Most users don't know the difference, but it's a big pain in the patootie for me. I only host, so I'm not scared of anyone screwing up my crap with crap-ons; even if I chose to look around the internets, I could switch the flag back on.

ALSO: How am I supposed to load custom save data? Rise of Blockland relied on a huge amount of save data dumped into files that could change at any time. If I can't access those, what the hell am I supposed to do? Change the .zip every time I close the server (which is at least daily, since I can't leave my machine on)? (see my next reply)

This update has done a ton to try and kill creative scripting (let's not forget that we can't set shape names or edit the player list anymore, things that had perfectly valid uses). My point is: Fix the security issues, but don't castrate scripting. I'd honestly rather my Add-Ons folder got flushed clean by a malicious script if it meant I could have the old method back.
« Last Edit: March 20, 2009, 03:16:58 AM by Mr. Wallet »

Being able to script effectively is really important. There needs to be some way to do it that is hard to abuse.

As a workaround, have you thought about writing a thing that would put modified scripts in via TCP and compile them via exec? You could probably write a little Java app to do that in about an hour.

stuff. I didn't know what that meant. This really messes up my scripting (Not that I do a lot, but still)

But I agree with wallet. Some sort of thing you can disable to let us use non-zipped folders. It would have to be semi hidden, not like in config, but a command you must run every start up I guess. The average user (The person who abuses this) would have no idea how to activate this, but people who script would, and could use it.

:(

The marvelous KINEX has pointed out to me that all files are still valid in default non-root directories other than Add-Ons; this means I can have working dynamic script files, so long as I accept they're all going to be in Blockland/base/ or Blockland/screenshots. In essence, a system designed to force a logical add-on structure has forced me to abandon them.

Yay, wallet saves the day. So now I'll have a blockland/base/Add-ons for when I'm working on mods.

Only I thought datablocks could only be started on server start? Or am I wrong? becouse exec new scripts would make datablocks.

No, you can't make your own folder. It has to be base/. If you want, you can use base/server for a project, base/recordings for another, etc.

You're not allowed to run from any non-default folder, meaning any place you run outside of a .zip is gonna have other crap not related to your project.

New datablocks seemed to work out OK after a map change in v10, dunno about now.

I checked up on this. You are all idiots living on fear.

I tried doing exec("Add-Ons/Poopon/blah.cs"); and I got an error: exec: invalid script file name Add-Ons/Poopon/blah.cs - add-on scripts must be in folders that follow the <category>_<name>convention.

So then I did exec("Add-Ons/Server_Poopon/blah.cs"); and it works fine.

I created all these files AFTER blockland started so I think the resource manager is working fine.

Here is a free function to save you typing:

function qe(%file) { exec("Add-Ons/Server_MrWallet/" @ %file @ ".cs"); }

Now you can do qe("somefile") and it will automatically expand it out to refer to Add-Ons/Server_MrWallet/somefile.cs in your very own server addon folder.
« Last Edit: March 20, 2009, 03:23:57 AM by kompressor »

Huh, that's weird. I woulda bet $20 that I tried that and it didn't work. (-1 cookie to wallet)

Still, having to do it from the add-ons folder is annoying as hell.

And what's the deal with setshapename / airline food?

OK so sorry for being a whiny bastard; I knew I was over-reacting and it was only a matter of time until someone pointed out a workaround, and as such I tried to keep from flaming too much, but I don't get mad often and I'm bad at restraining myself.
« Last Edit: March 20, 2009, 03:28:17 AM by Mr. Wallet »

Tom

Yeah, usually when I right prototypes I just exec it from the root BL folder.

Well now you have a convenient helper function you can use that involves LESS typing than exec. If it really bothers you, why not write something to re-exec it every time you hit a button, or every ten seconds, or whatever?

Man up and write something cool, everything works exactly the same except that you have to put your stuff in its own folder now, which you should be doing anyway.