Longest Script

Post any topic here, DW related or not.

Moderator: Admin

User avatar
origen
Dark Sidhe Lord
Posts: 903
Joined: Thu Feb 10, 2005 5:54 pm
Location: Secret League of Nirulat Headquarters
Contact:

Longest Script

Post by origen »

I was just wondering for anyone who has done any scripting, what is the longest script that you have written? I am finishing up the script for the Jail Cells, and so far, it has over 1300 lines. And, the good news is, it works. I just wonder if there is a limit on how long a script can be.
User avatar
ShadoKnight
Nomad
Posts: 28
Joined: Mon Mar 21, 2005 2:05 pm

Longest Script...

Post by ShadoKnight »

Hi!

As someone who was involved (a bit ;-) ) in the development of DW, I can say that at least as of the 2.0 release, the only limit is any limit that is imposed by the Python interpreter (that is, practically none). I'm sure you could easily go to tens of thousands of lines, possibly even hundreds of thousands of lines, without any problems.

SK
User avatar
HGamer
War Monger
Posts: 188
Joined: Thu Feb 10, 2005 7:59 pm
Location: Land of fruits & nuts, i.e. SoCal
Contact:

Post by HGamer »

My script to display all the pictures in DW is only 499 lines long. Most of them are showPicture or showMessage.
I shudder to think of how complex you could have made something over twice as long.
1 point 21 jigawatts!
User avatar
Growler
Necrolord
Posts: 1740
Joined: Mon Feb 14, 2005 10:37 pm
Location: Sputnik
Contact:

Post by Growler »

Hey SK, glad you came out from the shadows.. 8)

What say ye spill a few beans re: DW development?
Dish a lil dirt...shed mo' light than heat or vice-versa..

You know we're starving when it's gotten down to discussing # of lines in a script-code!

Btw, I wrote a D'n'D-style game in BASIC on an old Apple II (or was it a Trash80 Model-III?) that grew to 29,412,761 (+/- 29,412,000) lines of code before I got a real date & left that code so far behind it's not even funny anymore. :?
No Contraries : No Progression.
Opposition is true friendship, unless one is opposed to true friendship or (try) Resisting here http://www.cafepress.com/notheresistor
User avatar
ShadoKnight
Nomad
Posts: 28
Joined: Mon Mar 21, 2005 2:05 pm

Post by ShadoKnight »

Hi all ;-)

I suppose I've been lurking long enough. I'll start with saying I won't be reading or responding religiously, but I'll try to answer any questions I see.

By way of introduction, let me just say that I've not been involved with Shiftnig Suns or DW for over a year now, though I left on good terms in order to pursue my own interests. I'm currently starting a MS in CS, along with working my day job, which I happen to enjoy. DW was a fantastic project and a fabulous phase in my life, and I learned *a lot*, but it was time then to move on.

Having said all that, I've been following things off-and-on for the past year, and figured I'd make a bit more of an impact here in the forums, at least where I can help those of you who really enjoy the game and the modding aspect. I've probably got the most detailed knowledge of the game engine, game design, and implementation, at least as far as 2.0. For those who still can't figure out who I am, I'll provide one last clue: my "real" initials are JB :).

Anyway, feel free to send me private messages with questions if you want quick answers, or I'll peruse the forums and do my best to answer when I have time. I'm really thrilled by the fans of DW, and especially the great modding work that's being done. And I can't *wait* to play Bard's Whiskey :).

SK
User avatar
Growler
Necrolord
Posts: 1740
Joined: Mon Feb 14, 2005 10:37 pm
Location: Sputnik
Contact:

Post by Growler »

Suddenly sounds like JB's just'n been uncovered! :P

So, what can you tell us about thelven enclave?

Are Taireninaugh & Yeodaugh members of it?
8)

{& just in time fer Easter...where are the eggs??}
{{other'n'C'sS}}
No Contraries : No Progression.
Opposition is true friendship, unless one is opposed to true friendship or (try) Resisting here http://www.cafepress.com/notheresistor
User avatar
origen
Dark Sidhe Lord
Posts: 903
Joined: Thu Feb 10, 2005 5:54 pm
Location: Secret League of Nirulat Headquarters
Contact:

Post by origen »

HGamer,

Do you want to e-mail me a copy of your picture viewing script? Sometimes, a second pair of evey is helpful. I like to see how other people script, as well.
User avatar
HGamer
War Monger
Posts: 188
Joined: Thu Feb 10, 2005 7:59 pm
Location: Land of fruits & nuts, i.e. SoCal
Contact:

Post by HGamer »

JB is...
:o
Well, unless you're the other JB listed, you certainly are the source.
Don't be surprised if I post my nitpicky questions about the items_BL2D then.

Growler, I can't claim it was original to start with, since I started with the DEC BASIC version. But I eventually ended up with a real-time Trek game on a TRS-80 Mod 1. Surpassed that only with adding machine-language line-drawing to the "Temple of Apshai" games so the graphics were oodles faster. Only thing that I'm more proud of from back then was a floppy disk cataloger in BASIC with machine-language sort. Unfortunately, after that happy time in the mid-1980s, I fell off the cutting edge and have putzed around ever since.
"Old-school programmers don't count lines of code; they count sheets of yellow legal pad." :wink:
1 point 21 jigawatts!
User avatar
Growler
Necrolord
Posts: 1740
Joined: Mon Feb 14, 2005 10:37 pm
Location: Sputnik
Contact:

Post by Growler »

Machine language is truly hard-core! But oh-so-quick & agile.. And 'ToA' brings back fond memories of Wanting to play it...had to settle for Wiz-I & Ultima II. Probably my own proudest moment was when I somehow managed to write a BASIC program (not very long) that could solve some sort of Algebra II/Pre-cal problem...my math teacher (who could do a little programming) said flatly it couldn't be done & was all agape when it worked for every single problem he could throw at it. Just had to parse the prob into 3 chunks & step thru it..

Ok, guys--not funny anymore...I really need that last batch of punch cards! :evil:
No Contraries : No Progression.
Opposition is true friendship, unless one is opposed to true friendship or (try) Resisting here http://www.cafepress.com/notheresistor
User avatar
ShadoKnight
Nomad
Posts: 28
Joined: Mon Mar 21, 2005 2:05 pm

Post by ShadoKnight »

Let me think... other JB... that'd probably be my dad (who helped with Manual layout ;-) ). Anyway, feel free to ask away. I am planning (as soon as I have time) to write a lengthy-ish piece in the 'how-to-mod' topic with some nifty bits, like how we did one-way and 'real' secret doors (i.e., secret doors that are marked so secret-door identification scripts will pick them up). A lot of this I can't answer off the top of my head, though, as I haven't looked at the code for a year :) Anyway, like I said, ask away and I'll do my best to answer.

Justin
User avatar
ShadoKnight
Nomad
Posts: 28
Joined: Mon Mar 21, 2005 2:05 pm

Post by ShadoKnight »

(Doh! So much for that...). Oh well, now there's no mystery.

SK

P.S. To answer the earlier posted question about the Elven Enclave, all I can say is that I don't know how it ended up being implemented (if it did), but my vision for it was to be a second town, smaller than Rennibister, accessible on the main map, with at least a store, a tavern, and a temple, as well as a few NPC encounters. The town would be woodsey, and inhabited mostly by elves, as an outpost intended to facilitate trade with their (primarily) human neighbors. As such, it wouldn't include Yeodaugh, as he's not an elf, and while Taire is technically elven, it probably wouldn't include her either, as (a) she lives in Rennibister, and (b) she's a Dark Elf, so likely wouldn't associate with her woodland bretheren much. Incidentally, I also envisioned a Dwarven town, ala Moria from LotR, which was the whole original reason for supporting variable-height ceilings in dungeons ;-) I doubt that ever came into existance, but it would be a cool mod!
User avatar
Growler
Necrolord
Posts: 1740
Joined: Mon Feb 14, 2005 10:37 pm
Location: Sputnik
Contact:

Post by Growler »

Hey, there's always mystery...like, say, what the heck were ye delving into at Fermi? Perhaps some things requiring 500 trillion electron megavolts?? 8) :P 8)

Wish that EE had been implemented! Along with the Dwarven Town..

Re: Yeodaugh--figured he could pass for an elf if need be..if'n he's all that with casting illusions...or, counter-clockwise, figured the sharing of the end-spelling of his name (w/ Taire) might suggest an extra dimension such as a disguise to make himself appear Gnomish...oh well.

Glad you're around to field some wild throws! :P
No Contraries : No Progression.
Opposition is true friendship, unless one is opposed to true friendship or (try) Resisting here http://www.cafepress.com/notheresistor
User avatar
origen
Dark Sidhe Lord
Posts: 903
Joined: Thu Feb 10, 2005 5:54 pm
Location: Secret League of Nirulat Headquarters
Contact:

Post by origen »

This is an action editor related question, but does anyone know exactly what the heck the action:

0x000e0001

is supposed to be? By looking at the monsters.txt file, it seems to be causing different damage by different monsters. I am assigning skills to my monster, and this is still confusing me.
User avatar
Growler
Necrolord
Posts: 1740
Joined: Mon Feb 14, 2005 10:37 pm
Location: Sputnik
Contact:

Post by Growler »

Mebe it's diabolically designed to confuse even League of Nirulat Mod-Gods..?

8)
No Contraries : No Progression.
Opposition is true friendship, unless one is opposed to true friendship or (try) Resisting here http://www.cafepress.com/notheresistor
User avatar
ShadoKnight
Nomad
Posts: 28
Joined: Mon Mar 21, 2005 2:05 pm

Actions...

Post by ShadoKnight »

There are a handful of hard-coded actions, and 0x000e0001 is one of them (the only one that really matters, at this point, as far as I can remember). Skill 0x000e0001 is the generic 'attack' skill. It works as a basic physical attack, with chance to hit based on the relationship between the attacker's DX and the defender's AC (modified in both cases by appropriate modifiers), and damage computed based on the attacker's ST (I don't have the equations handy, sorry!). Basically, a monster with higher DX and higher ST will hit more often and do more damage. Also, NAT (# of attacks) is used by this skill, so a monster can hit multiple times if it's NAT is > 1 and it uses the generic attack skill.

SK
Post Reply