Dilemma with casino limits – looking for alternative solutio

Post » Fri Dec 02, 2011 5:28 pm

I'm trying to set up a high winnings limit casino, but I want to set up some comps at reasonable levels. The casino data appears to be hard wired so that your winnings levels are a ratio of the overall maximum winnings limit.

So for my casino if I set the max winnings at say $50,000, that puts each level like so:

Small Level: 12500
Big Level: 25000
Huge Level: 37500

I would prefer that these levels be a little lower as many folks won't be bothered to gamble that much. I think I have some pretty cool rewards as comps such as some custom armor and a silenced Perforator from FO3 type weapon. So that will hopefully entice some to play.

I would like my levels to look more like this:

Small Level: 5000
Big Level: 10000
Huge Level: 20000

Is this even a possibility to do?

I have the following set up and working like everything should. I just don't want to have to set such a low overall winnings level to get the settings that control the comps where I want them. Basically, I don't think a player should be banned at such low levels. They don't do it in Vegas like that I can tell you that. It takes a LOT more winnings, lol.

scn BucksLuckyCasinoCompsSCRIPTshort SmallFryshort BigWinnershort Whaleint dooncebegin GameMode	if GetCasinoWinningsLevel BucksCasinoData =http://forums.bethsoft.com/index.php?/topic/1166475-dilemma-with-casino-limits-%e2%80%93-looking-for-alternative-solutions-please/= 1 && SmallFry == 0		PlaySound GAMESlotsWinSmall		Player.AddItem BucksCombatBlack 1		set SmallFry to 1		ShowMessage BucksLuckyCasinoComps01	elseif GetCasinoWinningsLevel BucksCasinoData == 2 && BigWinner == 0		PlaySound GAMESlotsWinMed		Player.AddItem Bucks10mmSMG 1		set BigWinner to 1		ShowMessage BucksLuckyCasinoComps02	elseif GetCasinoWinningsLevel BucksCasinoData == 3 && Whale == 0		PlaySound GAMESlotsWinJackpot		Player.AddItem BucksPerforator 1		set Whale to 1		if doonce == 0		ShowMessage BucksLuckyCasinoComps03		endif	endifend


Thanks

One other thing I thought of. Is it even possible to remove the ban all together?
User avatar
RUby DIaz
 
Posts: 3383
Joined: Wed Nov 29, 2006 8:18 am

Post » Fri Dec 02, 2011 8:22 pm

Isn't the banning done by checking for GetCasinoWinningsLevel == 4? Since your script doesn't handle the max value, you should already have removed the limit.

There is also the function SetCasinoWinningsLevel, you could try to play with that and reset the counter, for example set it to back to 0 at level 2
User avatar
luis dejesus
 
Posts: 3451
Joined: Sun Aug 19, 2007 7:40 am

Post » Fri Dec 02, 2011 5:19 pm

Isn't the banning done by checking for GetCasinoWinningsLevel == 4? Since your script doesn't handle the max value, you should already have removed the limit.


I hoped that was correct, but I don't think so.

I have a comps quest with the above script as it's script and it's a quest script. I have my comps quest attached to my Casino Data form, just like the Atomic Wrangler's comps are setup. (That's where I got the idea.)
For quicker testing purposes I have my Max winnings set to 2000, so that gives me this:

Small Level - 500
Big Level - 1000
Huge Level - 1500
Maxed Level - 2000

I can go in and win to each level, it backs me off the table like it's supposed to and plays the sound, shows the message and adds the proper comp perfectly for all 3 levels. After getting all the comps I can gamble some more, and as soon as I hit 2000 chips I get insta baned. So even though I have no banning anywhere in my quest or script you get banned nonetheless. So it would seem to me that the banning is hard wired into the Casino Data Form and cannot be stopped but only made less likely by giving it an insanely high winnings limit. That's my dilemma.

But I also readily admit I'm a total noob and just learning.



There is also the function SetCasinoWinningsLevel, you could try to play with that and reset the counter, for example set it to back to 0 at level 2


I'm not sure how to go about that as I'm so green, lol. I don't think you mean this:

if GetItemCount BucksChip >= 2500 && SmallFry == 0		PlaySound GAMESlotsWinSmall		Player.AddItem BucksCombatBlack 1		set SmallFry to 1		ShowMessage BucksLuckyCasinoComps01		SetCasinoWinningsLevel to 0


Am I wrong, but wouldn't this just loop at the first level?
User avatar
Eileen Collinson
 
Posts: 3208
Joined: Thu Dec 28, 2006 2:42 am

Post » Fri Dec 02, 2011 9:18 pm

Am I wrong, but wouldn't this just loop at the first level?

Of course you'd need another variable to keep track of that change, but that's an suboptimal solution anyway, we don't know enough about the new scripting commands to know the consequences of this approach.

Have you tried to change the MaxWinnings parameter in the gambling-scripts?

ShowBlackjackMenuParams YourCasino 1 200 100000Casino = yourCasinoMin Bet = 1Max Bet = 200Max Winings = 100000

User avatar
Pumpkin
 
Posts: 3440
Joined: Sun Jun 25, 2006 10:23 am

Post » Fri Dec 02, 2011 1:36 pm

Of course you'd need another variable to keep track of that change, but that's an suboptimal solution anyway, we don't know enough about the new scripting commands to know the consequences of this approach.

Have you tried to change the MaxWinnings parameter in the gambling-scripts?

ShowBlackjackMenuParams YourCasino 1 200 100000Casino = yourCasinoMin Bet = 1Max Bet = 200Max Winings = 100000




I'm hoping by "gambling-scripts" you were meaning the script for my blackjack table, right? If so, I tried this. Insta ban again at 2K caps after being comped correctrly. Did I miss something? :banghead:

Object script:

scn BucksBlackjackSCRIPTbegin OnActivate		if IsActionRef player	        ShowBlackjackMenuParams BucksCasinoData 1 200 100000	endifend

User avatar
Gisela Amaya
 
Posts: 3424
Joined: Tue Oct 23, 2007 4:29 pm

Post » Fri Dec 02, 2011 1:35 pm

I'm hoping by "gambling-scripts" you were meaning the script for my blackjack table, right? If so, I tried this. Insta ban again at 2K caps after being comped correctrly. Did I miss something? :banghead:


No, you did everything right, it's just that the fourth parameter doesn't work as I assumed. All documentation we have are the few scripts where the commands are used.

So how about another approach? Set the casino limit to an insanely high value to disable the ban, and instead of using GetCasinoWinningsLevel keep track of the chips you've earned (itemcount before and after gambling) and on certain thresholds give the player his gifts.
User avatar
JD bernal
 
Posts: 3450
Joined: Sun Sep 02, 2007 8:10 am

Post » Fri Dec 02, 2011 8:47 pm

No, you did everything right, it's just that the fourth parameter doesn't work as I assumed. All documentation we have are the few scripts where the commands are used.

So how about another approach? Set the casino limit to an insanely high value to disable the ban, and instead of using GetCasinoWinningsLevel keep track of the chips you've earned (itemcount before and after gambling) and on certain thresholds give the player his gifts.


THIS! That is in fact the first way I tried to do this. However, how do I track the winnings? I thought about GetItemCount on the chips, but you could just go buy that many, instead of gambling. I can't find any other parameters than the 4 winnings levels in the casino data form. And unfortunately, if I set an insane high amount, those levels automatically increase with the maximum winnings limit.
User avatar
Sara Johanna Scenariste
 
Posts: 3381
Joined: Tue Mar 13, 2007 8:24 pm

Post » Fri Dec 02, 2011 8:41 pm

Still looking for suggestions or solutions from you scripting & modding guru's out there. This is basically all I have left to do before cleaning up, packing up and releasing!
User avatar
Thema
 
Posts: 3461
Joined: Thu Sep 21, 2006 2:36 am

Post » Fri Dec 02, 2011 6:38 pm

Still looking for suggestions or solutions from you scripting & modding guru's out there. This is basically all I have left to do before cleaning up, packing up and releasing!


In the scripts of the tables and slot machines store the itemcount in a variable before you start the gambling. After gambling (back in gamemode) add the difference to your total winnings.


scn MyBlackJackTablelong chipcountbegin OnActivate		if IsActionRef player		Set chipcount to player.getitemcount yourchips		ShowBlackjackMenuParams AtomicWranglerCasinoData 1 200 0	endifendbegin Gamemode	If chipcount >0		set GlobalWinnings to GlobalWinnings + player.getitemcount yourchips - chipcount		set chipcount to 0	endifend

User avatar
BRAD MONTGOMERY
 
Posts: 3354
Joined: Mon Nov 19, 2007 10:43 pm

Post » Fri Dec 02, 2011 11:29 pm

Hey JOG, thanks again for the help and I appreciate your patience and bearing with my elementary questions, lol. Hopefully, with your help I can get this working and ready to go this evening when I get home.

So, I edited my forms for the Blackjack Table. I assume I needed to set the limits like I did as that's how I have the casino data set. Hopefully I did it right. It looks like this:

scn BucksBlackjackSCRIPTlong chipcountbegin OnActivate                if IsActionRef player                Set chipcount to player.getitemcount BucksChips                ShowBlackjackMenuParams BucksCasinoData 1 200 100000        endifendbegin Gamemode        If chipcount >0                set GlobalWinnings to GlobalWinnings + player.getitemcount BucksChips - chipcount                set chipcount to 0        endifend



Now for the quest script that actually goes with the casino data is this how I should do it? (I'm not very experienced with writing scripts and am just scratching the surface of being able to read them a little and get a vague idea of what they are doing.

scn BucksLuckyCasinoCompsSCRIPTbegin GameMode        if GetGlobalWinnings => 2000                PlaySound GAMESlotsWinSmall                Player.AddItem BucksCombatBlack 1                ShowMessage BucksLuckyCasinoComps01        elseif GetGlobalWinnings => 4000                PlaySound GAMESlotsWinMed                Player.AddItem Bucks10mmSMG 1                ShowMessage BucksLuckyCasinoComps02        if GetGlobalWinnings => 8000                PlaySound GAMESlotsWinJackpot                Player.AddItem BucksPerforator 1                ShowMessage BucksLuckyCasinoComps03                endif        endifend


Thanks again! (Sorry, but this is about the limit of my knowledge, and that's probably wrong, lol)
User avatar
Janeth Valenzuela Castelo
 
Posts: 3411
Joined: Wed Jun 21, 2006 3:03 am

Post » Fri Dec 02, 2011 2:13 pm

scn BucksLuckyCasinoCompsSCRIPTbegin GameMode        if GetGlobalWinnings => 2000                PlaySound GAMESlotsWinSmall                Player.AddItem BucksCombatBlack 1                ShowMessage BucksLuckyCasinoComps01        elseif GetGlobalWinnings => 4000                PlaySound GAMESlotsWinMed                Player.AddItem Bucks10mmSMG 1                ShowMessage BucksLuckyCasinoComps02        if GetGlobalWinnings => 8000                PlaySound GAMESlotsWinJackpot                Player.AddItem BucksPerforator 1                ShowMessage BucksLuckyCasinoComps03                endif        endifend


The "=>" might compile without error, but it might be converted to "greater than". "Greater or equal" is usually ">="

If you check for greater than, and have still greater tresholds you need to check for them first, or the lower one will always override them. But in this case you also need to make sure that you get each of them only once, as it currently is, you'd get one present per frame.


scn BucksLuckyCasinoCompsSCRIPTshort giftsbegin GameMode        if (GetGlobalWinnings >= 2000) && (gifts == 0)                set gifts to 1                PlaySound GAMESlotsWinSmall                Player.AddItem BucksCombatBlack 1                ShowMessage BucksLuckyCasinoComps01        elseif (GetGlobalWinnings >= 4000) && (gifts == 1)                set gifts to 2                PlaySound GAMESlotsWinMed                Player.AddItem Bucks10mmSMG 1                ShowMessage BucksLuckyCasinoComps02        elseif (GetGlobalWinnings >= 8000) && (gifts == 2)                set gifts to 3                PlaySound GAMESlotsWinJackpot                Player.AddItem BucksPerforator 1                ShowMessage BucksLuckyCasinoComps03                endif        endifend

User avatar
Imy Davies
 
Posts: 3479
Joined: Fri Jul 14, 2006 6:42 pm

Post » Sat Dec 03, 2011 3:38 am

scn BucksLuckyCasinoCompsSCRIPTbegin GameMode        if GetGlobalWinnings => 2000                PlaySound GAMESlotsWinSmall                Player.AddItem BucksCombatBlack 1                ShowMessage BucksLuckyCasinoComps01        elseif GetGlobalWinnings => 4000                PlaySound GAMESlotsWinMed                Player.AddItem Bucks10mmSMG 1                ShowMessage BucksLuckyCasinoComps02        if GetGlobalWinnings => 8000                PlaySound GAMESlotsWinJackpot                Player.AddItem BucksPerforator 1                ShowMessage BucksLuckyCasinoComps03                endif        endifend


The "=>" might compile without error, but it might be converted to "greater than". "Greater or equal" is usually ">="

If you check for greater than, and have still greater tresholds you need to check for them first, or the lower one will always override them. But in this case you also need to make sure that you get each of them only once, as it currently is, you'd get one present per frame.


scn BucksLuckyCasinoCompsSCRIPTshort giftsbegin GameMode        if (GetGlobalWinnings >= 2000) && (gifts == 0)                set gifts to 1                PlaySound GAMESlotsWinSmall                Player.AddItem BucksCombatBlack 1                ShowMessage BucksLuckyCasinoComps01        elseif (GetGlobalWinnings >= 4000) && (gifts == 1)                set gifts to 2                PlaySound GAMESlotsWinMed                Player.AddItem Bucks10mmSMG 1                ShowMessage BucksLuckyCasinoComps02        elseif (GetGlobalWinnings >= 8000) && (gifts == 2)                set gifts to 3                PlaySound GAMESlotsWinJackpot                Player.AddItem BucksPerforator 1                ShowMessage BucksLuckyCasinoComps03                endif        endifend

User avatar
Wayne Cole
 
Posts: 3369
Joined: Sat May 26, 2007 5:22 am

Post » Fri Dec 02, 2011 5:58 pm

The "=>" might compile without error, but it might be converted to "greater than". "Greater or equal" is usually ">="

If you check for greater than, and have still greater tresholds you need to check for them first, or the lower one will always override them. But in this case you also need to make sure that you get each of them only once, as it currently is, you'd get one present per frame.


scn BucksLuckyCasinoCompsSCRIPTshort giftsbegin GameMode        if (GetGlobalWinnings >= 2000) && (gifts == 0)                set gifts to 1                PlaySound GAMESlotsWinSmall                Player.AddItem BucksCombatBlack 1                ShowMessage BucksLuckyCasinoComps01        elseif (GetGlobalWinnings >= 4000) && (gifts == 1)                set gifts to 2                PlaySound GAMESlotsWinMed                Player.AddItem Bucks10mmSMG 1                ShowMessage BucksLuckyCasinoComps02        elseif (GetGlobalWinnings >= 8000) && (gifts == 2)                set gifts to 3                PlaySound GAMESlotsWinJackpot                Player.AddItem BucksPerforator 1                ShowMessage BucksLuckyCasinoComps03                endif        endifend



OK, awesome! I was unsure on the float parts, but at least I was headed in somewhat the right direction. (That's a miracle in itself, lol.)

I've said before that folks such as yourself are a credit to our community – ESPECIALLY for us noobs who basically only know enough to be dangerous, lol. I can't wait to plug it in and try it out tonight!

Thanks again!
User avatar
Monika Krzyzak
 
Posts: 3471
Joined: Fri Oct 13, 2006 11:29 pm

Post » Fri Dec 02, 2011 7:11 pm

Well, I seem to have hit a snag. It won't save the scripts because it says "GlobalWinnings" is an unknown variable. In the blackjack table script I added "short GlobalWinnings" up at the top just under the "long chipcount" and it allowed me to save. I have no clue if that was what I actually needed to put in. Then I tried to add the other script for the comps and it said "GetGlobalWinnings" was also unknown. I just copied what you put in above and pasted it into my script, so I think I'm definitely missing something. What else do I need to add?
User avatar
Gemma Archer
 
Posts: 3492
Joined: Sun Jul 16, 2006 12:02 am

Post » Fri Dec 02, 2011 6:27 pm

"GlobalWinnings" was supposed to mean "Global variable in which you count your winnings"

You create global variables under Gameplay\Globals. Since they're not bound to a certain script you can access them from everywhere.
You could also create those variables in a quest's or object's script, but then you'd have to access them in the format "YourQuest.YourVariable" resp. "YourObject.YourVariable".

The same goes for "GetGlobalWinnings" but I didn't make up that name, I just copied it from your script.


Generally we expect you to try and compile your script once in a while before posting here. Scripting / programming is usually a long sequence of trial and error, until you come to a point where everything seems to work as intended.
User avatar
Monika
 
Posts: 3469
Joined: Wed Jan 10, 2007 7:50 pm

Post » Fri Dec 02, 2011 3:30 pm

Thanks again, JOG. And believe me, I have tried very, very hard NOT to bother people with my questions, and figure out everything I could on my own. But this is my first real attempt at anything this involved so I'm struggling to try and learn what I need to learn in order to finish up. As I said, I appreciate your patience, but if beginners can't come here for help, how are we ever supposed to learn and get to a point where we can figure out this stuff on our own? Even the most experience folks around here had to learn in the beginning, and for someone with no coding or scripting experience this stuff can be confusing and downright hard to understand.

I pulled the “GlobalWinnings” bit from one of the snippets you posted above. I just assumed it was a parameter already in the game like itemcount or whatever since you had it in your script. (Sorry, but I don't know any better.) But I will try and see if I can figure out what you mean when I get home tonight.

As for trial and error, I started this thread with a working script that I set up completely on my own by going through all the casino stuff in the game and figuring out how they were doing stuff. I just needed it to work differently and didn't know how. Since then I have tried 4 or 5 different things with your help, so it's not like I've been lazy and wanted somebody to do this for me. Quite the contrary, I've busted my ass on this mod, and this is the absolute last thing I really want to do. But if I can't figure it out, I'll definitely be disappointed but it won't be the end of the world I guess. I can figure out another way to give players their stuff maybe in the quest itself. I just felt it would be a neat way to give the players the armor and weapons.
User avatar
Bereket Fekadu
 
Posts: 3421
Joined: Thu Jul 12, 2007 10:41 pm

Post » Sat Dec 03, 2011 12:26 am

Thanks again, JOG. And believe me, I have tried very, very hard NOT to bother people with my questions, and figure out everything I could on my own. But this is my first real attempt at anything this involved so I'm struggling to try and learn what I need to learn in order to finish up. As I said, I appreciate your patience, but if beginners can't come here for help, how are we ever supposed to learn and get to a point where we can figure out this stuff on our own? Even the most experience folks around here had to learn in the beginning, and for someone with no coding or scripting experience this stuff can be confusing and downright hard to understand.


Hey, no hard feelings,okay? I just meant this isn't school. There are various ways to write a script, some more elegant than others, but the only wrong way to write a script is the one where it doesn't even compile. Just write a script and try it, if it doesn't work you can still ask here, but you learn the most when you manage to fix it yourself.

And yes, "busting your ass" is the very essence of modding. We spend our spare time with stuff others do as their full-time job.
User avatar
Petr Jordy Zugar
 
Posts: 3497
Joined: Tue Jul 03, 2007 10:10 pm


Return to Fallout: New Vegas