Read file triggerhack

Definitely not my cleanest code, 'twas a proof of concept piece.

Didn’t realize that client strings have such a small cap. Are server strings that limited as well?

All strings have the same cap that includes the server.whatever=

Yes, I believe client and server strings stop at 250. :open_mouth:

That limitation is only if it’s sent over the network by the conventional means. The weapon workaround bypasses that limit entirely and gives it a much greater range. Hell, the range is so large that I can’t even test if it’s greater than 65536, because that’s the maximum amount of characters on a line in the Graal editor and I’m too lazy to append strings or open it in notepad.

Thanks. I’ll have to keep this in mind when I’m working on my server. I’ve had a few passing ideas over the last month or so but they’ve all required hefty use of strings. Guess I’d better start re-thinking some stuff

nudge Whats the go with this, Is it still going to happen?

How do you want to receive your data? Tell me how you think you should be able to read it and I’ll tell you if I think it is possible or not!

Uhhh I spose tokens would be the most manageable way. To be honest I didnt really think of how It would be stored. But yer I think tokens would be the best way. But then… what defines a token bla bla bla. Downsider, help!!! Provided you could somehow bypass string caps I would say length strings and a new string for each line. Or /n. Do either tokens or strings and Ill be fine.

See, the thing is, this feature request takes some thinking. And I really don’t feel like thinking right now. Any way you look at it, it is going to be a pain in the ass. You have no clue how long it will take for the data to reach you. It could be in 0.1 seconds. Or 3 seconds. You have to think about how to notify the script that the data arrived. How to pass the data onto the script. It is more complex than I can bother devoting time to at the moment.

Fair enough, Ill just look for alternatives like appending npc code to nw files o.0 I dont know if the append trigger hack will let me but we shall see!

sounds like you just read from the socket.

You could write a shitty version without the checks that will work at random and let someone else figure out a patchy solution.

Isn’t that how most things on Graal Reborn are done??

I thought Graal Reborn was all about finding ways around Stefan’s shitty coding.

Bumping this thread because I want it done, I would like it read line by line. So maybe you could have triggeraction 0,0,gr.getline,“file.txt”,linenumber;
and it can just scan the file and read it line by line from which its put into an array of strings. Each line is one element of the array.

Shouldn’t be too hard to do right?

I suppose I can add it if I ever get around to it. I don’t have much time these days.

Thanks man, it would greatly appreciated :slight_smile:

Yay for a new way of storing data with easy manipulation!

bumpedy mother fuckin bump, nalin if you can’t be bothered at all doing this just let me know so I can accept it and move on please.

Accept it. Move on.

after I get the word from nalin

Nalin works 45-50 hours per week. Your request may happen in the future, but not right now.