Modding Ideas
i've been a bit busy this week, and aside from laying it out, I haven't had much time to implement it. Why don't you send me the latest version of the code so I can make sure I keep the pane and dockscreen format consistent.FAD wrote:Burzmali; How's it going with your game idea? Haven't heard anything in a while. Also, do you want the current casino xml to bring you up to date with what we have so far as well as for when you complete your game, you can add it in?
Here's the code for the 10 Card game. It has a problem that I can't find.
I'm going to keep looking, but a extra eyes wouldn't hurt.
EDIT: Actually took less time than I would have thought. You can't have a number at the start of a Dockscreen tag it seems.
That said, I now have the working code for 10 Card (eastern version). I'll splice it into the next working version of the casino code that I receive.
EDIT2: Forgot to mention, I am working on another betting game similiar to gambling on horse racing. I should have it working in a few days.
Code: Select all
SNIPPED
EDIT: Actually took less time than I would have thought. You can't have a number at the start of a Dockscreen tag it seems.
That said, I now have the working code for 10 Card (eastern version). I'll splice it into the next working version of the casino code that I receive.
EDIT2: Forgot to mention, I am working on another betting game similiar to gambling on horse racing. I should have it working in a few days.
- dvlenk6
- Militia Captain
- Posts: 519
- Joined: Sun Mar 05, 2006 6:56 am
- Location: Sanctuary and beyond
- Contact:
If it would be convenient, I have lots of unused web space that I could use to house the .xml for the most current Casino version. I could just make page w/ a static url that you could go to at any time to get the most current one.
Might save time sending files around in emails. And anybody else that wanted to look it over for whatever reason could just go ahead and grab it.
Might save time sending files around in emails. And anybody else that wanted to look it over for whatever reason could just go ahead and grab it.
Burzmali, YGM.
dvlenk, placing the current xml on the net is fine, if you don't mind having to update it everytime a new addition is made to the xml (along with stating a notice here everytime you update the site.) Your choice. Otherwise, it's no prob sending it in email. It's not that big of a file and I'm still using a dial-up modem.
dvlenk, placing the current xml on the net is fine, if you don't mind having to update it everytime a new addition is made to the xml (along with stating a notice here everytime you update the site.) Your choice. Otherwise, it's no prob sending it in email. It's not that big of a file and I'm still using a dial-up modem.

- dvlenk6
- Militia Captain
- Posts: 519
- Joined: Sun Mar 05, 2006 6:56 am
- Location: Sanctuary and beyond
- Contact:
I have dial-up too. It is all that is available here, unless a buy a sattelite dish, and I am WAY to cheap to do that.
Since there are only really three of us working this, I guess emailing is fine. If it becomes a hassle, just say so.
Since there are only really three of us working this, I guess emailing is fine. If it becomes a hassle, just say so.
I had a chance to review the rest of the xml, and I can't believe that it works! In the file FAD sent me, the block declarations are all Nil or empty and variables are being referenced way outside their scope. George, is the program treating an undeclared local variable like a global variable?
-
- Developer
- Posts: 2998
- Joined: Thu Jul 24, 2003 9:53 pm
- Contact:
Yes, that's exactly what is happening. Sorry (unless you think it's a good idea, in which case, cool!)Burzmali wrote:George, is the program treating an undeclared local variable like a global variable?
Any undeclared variable is automatically treated as a global variable. In Transcendence.xml you might notice global variables like gResult or gStart. There is nothing special about those--the "g" prefix is just a convention so that I can remember that they are global.
The only possible downsides are:
1. You might get into trouble if someone else uses the same variable name in a different part of the code (and uses it for a different purpose).
2. You can't assume that the variable is Nil the first time you use it.
Note also that global variables are NOT preserved when the game is saved/loaded. If you need state to persist across save/load boundaries (which is most of the time) store the state using (objSetData) and its relatives.
"Works great" is a vague concept. Encapsulation is a good thing after all, heck, even the scope of (objSetData gSource ...) is too large in my opinion, but I don't think that (objSetData gPane or gScreen ...) will work.
But, on a happier note, I have Blackjack working (aside from split), so if you would send me the latest version of the xml, I will splice it in.
But, on a happier note, I have Blackjack working (aside from split), so if you would send me the latest version of the xml, I will splice it in.
- dvlenk6
- Militia Captain
- Posts: 519
- Joined: Sun Mar 05, 2006 6:56 am
- Location: Sanctuary and beyond
- Contact:
Burzmali, since you have all of the current xml, why don't you go ahead and make into a proper form?
Or would that be a lot of work?
I don't know how to do that, or I would. I don't know anything about programming or any kind of scripting except perl.
I just made it so that it would work. If you can make it better that would be great.
Or would that be a lot of work?
I don't know how to do that, or I would. I don't know anything about programming or any kind of scripting except perl.
I just made it so that it would work. If you can make it better that would be great.

Burzmali, yours that you've sent is the latest version of the casino XML. I haven't done anything new with it yet as I've been testing the bar encounters.
With that, I'm having a problem with the Salesman encounter--all works OK up 'til the "exchange" screen, which is supposed to appear and finalize the Salesman encounter dialogue. Oddly, that last dialogue screen will not execute but the exchange is made, blindly however and the main dockscreen appears instead.
I've looked that code over but have not been able to figure out why it won't show up. Maybe you can take a look at it and figure out what I've missed?
With that, I'm having a problem with the Salesman encounter--all works OK up 'til the "exchange" screen, which is supposed to appear and finalize the Salesman encounter dialogue. Oddly, that last dialogue screen will not execute but the exchange is made, blindly however and the main dockscreen appears instead.
I've looked that code over but have not been able to figure out why it won't show up. Maybe you can take a look at it and figure out what I've missed?
Your problem is here:
The solution is simple, all you have to do is remove those last two lines, as the "Bar-Purchase" pane handles all of the logic after it is determine that the sale wasn't a trap.
At (1) you are calling the "Bar-Purchase" pane, which performs the transaction, but then you are then calling the "BarRoom" pane which is what ends up getting displayed on the screen.<SalesmanOK
desc=""Terrific! Meet me at the docks and we'll make the exchange."">
<Actions>
<Action name="Continue" imageID="&rsItemListScreen;" imageIndex="1" default="1" cancel="1" key="C">
(block Nil
(if (ls (random 1 20) 20)
(1) (scrShowPane gScreen "Bar-Purchase")
(scrShowPane gScreen "Bar-Busted")
)
; Can't encounter Salesman again
(objSetGlobalData gSource "EncounterSalesman" True)
(2) (scrShowPane gScreen "BarRoom")
)
</Action>
</Actions>
</SalesmanOK>
The solution is simple, all you have to do is remove those last two lines, as the "Bar-Purchase" pane handles all of the logic after it is determine that the sale wasn't a trap.
Doh! You're right! So simple I overlooked it. Thank you!
I'll correct that in the copy I have now but could you correct it in the one you'll be sending once you get your other game in, please? That way the latest version will include that fix and we won't have to back track it again.
I'll correct that in the copy I have now but could you correct it in the one you'll be sending once you get your other game in, please? That way the latest version will include that fix and we won't have to back track it again.