NS's sandbox (in General)


ScY March 1 2010 10:51 AM EST

Didnt NS make something like a CB sandbox way back when...I remember it on like cbtools or something, but theres nothing in the wiki about it and I cant find it on google.

Anybody also remember or know if it was taken down (maybe like NS :D)

AdminQBnovice [Cult of the Valaraukar] March 1 2010 11:15 AM EST

I believe it was on Shade's site... it became useless after the move away from xp cost increases.

AdminNightStrike March 2 2010 8:52 AM EST

Yeah, I forgot about that thing. I put a lot of time into it :(

It was http://www.cbstuff.nl/cbtools/cbtools.html

ScY March 3 2010 8:24 AM EST

Seems to just be a black page now ;(

I really liked that thingy and I'm sad to see it die ;(

AdminNightStrike March 3 2010 11:28 AM EST

Don't use IE. I made it with the understanding that it would only support firefox.

ScY March 3 2010 11:32 AM EST

Who uses IE? This was from FF.. I got a black page when I follow the link you gave, and this is what I get when I go to the link from the homepage: The requested URL /cbtools.html was not found on this server.

Anyway, I added this to the wiki so that it is never lost to the bowels of history again.

Also, isnt the exp incorrect on cbtools after the fix to make everything cost a fixed amount of exp?

AdminNightStrike March 3 2010 12:19 PM EST

Well yeah, see novice's post. I gave up after that change.

As for why it's no longer rendering, I know not.

AdminShade March 3 2010 12:28 PM EST

Neither do I, the files are still located where they should be

AdminShade March 3 2010 12:34 PM EST

Just fixed the link from the initial CBstuff.nl web page. These 5 files are present on my web space.

cbtools.css
cbtools.html
cbtools.js
cbtools.svg
cbtools.xml

ScY March 3 2010 2:02 PM EST

Well I wonder if I can speak for the community, but that tool was awesome, and I would like to see it back.

Of course if this takes too much time, etc. then oh well I suppose, but it would be cool to have it back.

AdminShade March 3 2010 3:54 PM EST

I can provide for the files and have it checked out, don't know anything about the calculator myself though.

Perhaps NS has backups which work?

Salketer [big bucks] March 3 2010 5:20 PM EST

It is a slight problem in the HTML page, the does not get loaded at all same as for the body.

The <script
tag is not closed properly according to the doctype of the page.

Shade, please open cbtools.html with notepad and change:
line 8
<script type="application/javascript;version=1.7;e4x=1" src="cbtools.js" />
To
<script type="application/javascript;version=1.7;e4x=1" src="cbtools.js"></script>

Everything is gonna be displaying correctly. While testing on my computer, I get a javascript error but it does not seem to interfere with the good going of the script...

Spellcheck won't allow me to post it in Plain Text format but if I use HTML it will simply disapear since the script tags are not allowed in the forums.

AdminNightStrike March 4 2010 10:31 AM EST

Eh? Closing a tag in that fashion is perfectly legal xhtml 1.1, which the doctype is set to.

AdminNightStrike March 4 2010 10:40 AM EST

So looking at the JS, it shouldn't be too hard to short circuit the previous XP <
LVL conversions, and just * or / by 12.


Try this:

--- cbtools.js.old 2010-03-04 10:38:57.825028383 -0500
+++ cbtools.js 2010-03-04 10:40:11.099028169 -0500
@@ -45,6 +45,7 @@
}

function CalcObj(size) {
+ var cost = 12
var exp = new Array (size)
exp[0] = {max: 20, total: 0}
for (let i = 1; i < size; ++i)
@@ -54,19 +55,21 @@
}

this.lvl = function(x) {
- var cost = 0
- for (let i = 0; i < exp.length; ++i)
- if (x
exp[i].total)

- cost = i
- return (validnum(exp[cost].max + ( (x - exp[cost].total) / (cost + 1) )))
+// var cost = 0
+// for (let i = 0; i < exp.length; ++i)
+// if (x
exp[i].total)

+// cost = i
+// return (validnum(exp[cost].max + ( (x - exp[cost].total) / (cost + 1) )))
+ return (x / cost)
}

this.xp = function(x) {
- var cost = 0
- for (let i = 0; i < exp.length; ++i)
- if (x
exp[i].max)

- cost = i
- return (validnum(exp[cost].total + ( (x - exp[cost].max) * (cost + 1) )))
+// var cost = 0
+// for (let i = 0; i < exp.length; ++i)
+// if (x
exp[i].max)

+// cost = i
+// return (validnum(exp[cost].total + ( (x - exp[cost].max) * (cost + 1) )))
+ return (x * cost)
}
}

AdminNightStrike March 4 2010 10:40 AM EST

grrrr.....

Admin{CB1}Slayer333 [SHIELD] March 4 2010 10:50 AM EST

Foiled by your own hubris!

AdminShade March 4 2010 11:29 AM EST

is this the new file or additions and things I need to remove?

AdminNightStrike March 4 2010 11:34 AM EST

It's a patch that has been butchered by my own feature :(

You can read it and apply it manually, as it's fairly intuitive. Just comment out the bulk of those two functions, and just return x * cost or x / cost as appropriate. Also define cost to 12.

AdminShade March 4 2010 11:45 AM EST

I presume I have to add the ++ things and leave out the -- things.

what are the @@ things then?

AdminShade March 4 2010 11:51 AM EST

I think I've fixed it, though it still gives me a black screen?

AdminNightStrike March 4 2010 11:54 AM EST

The @@ things are messages to the patch tool to give it a line number hint. Your changes look fine.

You can try Salk's suggestion for changing how the script tag is terminated in the head section of the html.

AdminShade March 4 2010 11:56 AM EST

seems to have fixed it, it works now :)

AdminNightStrike March 4 2010 12:30 PM EST

Looks like you have some stray slashes above minion 2.

AdminShade March 4 2010 12:34 PM EST

not any more :)

Salketer [big bucks] March 4 2010 1:15 PM EST

NS, container tags cannot be closed with an ending / just like you cannot close paragraphs, titles, tables etc that way.

AdminNightStrike March 4 2010 8:57 PM EST

Hmm.. Well, you learn something new all the time. I thought you could close any tag in that fashion. I didn't realize certain types were excluded.

ScY March 7 2010 2:41 PM EST

So is this fixed? I went on the site and it seemed buggy.

AdminNightStrike March 7 2010 2:59 PM EST

It probably is... it's got way old values for stat calculations. No idea what else is broken.
This thread is closed to new posts. However, you are welcome to reference it from a new thread; link this with the html <a href="/bboard/q-and-a-fetch-msg.tcl?msg_id=0030cq">NS's sandbox </a>