| Author |
Message |
Phoenix T'KAR (Tkr101010) New member Username: Tkr101010
Post Number: 2 Registered: 1-2011
| | Posted on Sunday, January 16, 2011 - 11:47 pm: | |
(define shot7-step (if (on-board? $1) $1 (if (SLV2) (Ck-PPP) capture back (pTo pGatlingGun) else back) $1 (if (on-board? $1) $1 (if (SLV2) (Ck-PPP) capture back (pTo pGatlingGun) else back) $1 $1 (if (on-board? $1) $1 (if (SLV2) (Ck-PPP) capture back (pTo pGatlingGun) else back) $1 $1 $1 (if (on-board? $1) $1 (if (SLV2) (Ck-PPP) capture back (pTo pGatlingGun) else back) $1 $1 $1 $1 (if (on-board? $1) $1 (if (SLV2) (Ck-PPP) capture back (pTo pGatlingGun) else back) $1 $1 $1 $1 $1 (if (on-board? $1) $1 (if (SLV3) (Ck-PPP) capture back (pTo pGatlingGun) else back) $1 $1 $1 $1 $1 $1 (if (on-board? $1) $1 (if (SLV3) (Ck-PPP) capture back (pTo pGatlingGun) else back) )))))))) (define shot7 add mark (shot7-step n) (shot7-step e) (shot7-step w) (shot7-step s) (shot7-step ne) (shot7-step nw) (shot7-step se) (shot7-step sw) back) (define GatlingGun-s ((Ck-FP) $1 (verify empty?) (Ck-TP) (shot7))) (piece (name GatlingGun) (notation "GG") (image White "images\ko\W-GG.bmp" Black "images\ko\B-GG.bmp") (moves (GatlingGun-s sw) (GatlingGun-s ne) (GatlingGun-s nw) (GatlingGun-s se)) ) I'm having difficulty coding this piece, the Gatling Gun, which should be able to move 1 point diagonally, then shoot two pieces* up to seven points away in any of the eight directions. The code above works as far as getting the piece to move it's one diagonal, and get one shot off, but I can't figure out how to get it to shoot a second time. I've tried duplicating everything between “mark” and “back” in the shot7 definition and pasting it after the “back” in that definition. I've also tried adding a second “(shot7)” to the GatlingGun-s definition. But both of those just duplicate the possible options in the window that comes up when you select a piece to shoot (of which you can only select one) instead of bringing up a second window so that you can select a second piece to shoot. Can someone give me some advice on how to get the Gatling Gun to be able to shoot twice? Thanks *There are limits on which pieces can be shot, but these checks seem to be working and when I'm testing to see if the piece can shoot twice I AM making sure to test with two piece it is allowed to shoot. |
Greg Schmidt (Gschmidt2)
New member Username: Gschmidt2
Post Number: 129 Registered: 1-2007
| | Posted on Monday, January 17, 2011 - 10:23 am: | |
Look at "add-partial". Whenever you have a piece that moves once, and then that same piece can move again, you need to represent it as a partial move. You would create two different moves and assign them unique move types. For example you might have a GunMove with a move type of "gun-move" and a GunShoot with a move type of "gun-shoot". Those would be two distinct moves in the (moves) section and each would have a different move type. For the GunMove, instead of using "add", you would use "(add-partial gun-shoot)" which in effect says, after this move, give the player an extra move of type "gun-shoot". The GunShoot move would end with "add" as usual to conclude and cause the turn order to now advance to the next player. Look at the zrf language referenced and some examples such as in Checkers.zrf that's the way that multiple jumps are supported. -- Greg |
Phoenix T'KAR (Tkr101010) New member Username: Tkr101010
Post Number: 3 Registered: 1-2011
| | Posted on Monday, January 17, 2011 - 12:22 pm: | |
I had tried the add-partial, but apparently was doing it wrong. I had tried ... (define GatlingGun-s ((Ck-FP) $1 (verify empty?) (Ck-TP) (shot7) add-partial (shot7))) I'd like to check out the checkers rules as you suggest, but the file in the rules directory is a .zd2 file and when I open it in the text editor all I get is unreadable gibberish. How do I go about looking at .zd2 files? |
Greg Schmidt (Gschmidt2)
New member Username: Gschmidt2
Post Number: 130 Registered: 1-2007
| | Posted on Monday, January 17, 2011 - 12:55 pm: | |
C:\Program Files\Zillions Development\Zillions Demo\Rules\Checkers.zrf is the file I'm referring to. The code is: (define checker-jump-add (if (not-in-zone? promotion-zone) (add-partial jumptype) else (add King) ) ) -- Greg |
Phoenix T'KAR (Tkr101010) New member Username: Tkr101010
Post Number: 4 Registered: 1-2011
| | Posted on Monday, January 17, 2011 - 3:06 pm: | |
I'll try to see if I can figure out how to get that add-partial to work. In my rules folder I only see Checkers.zd2, not Checkers.zdf though. The same was true for the Select.zrf you mentioned in the other thread (ie. Select.zd2 is there, but not Select.zrf) |
Greg Schmidt (Gschmidt2)
New member Username: Gschmidt2
Post Number: 131 Registered: 1-2007
| | Posted on Monday, January 17, 2011 - 4:09 pm: | |
I'm using Zillions 2.0. I have never heard of zd2 files only zrf. -- Greg |
Andreas Speiger (Andique)
New member Username: Andique
Post Number: 10 Registered: 11-2007
| | Posted on Monday, January 17, 2011 - 4:31 pm: | |
I had the same problem with zd2-files. It's hard for me to explain you what you can do, because i don't know the english version of Windows. I have the german version (XP Home). Do you have XP Home or XP Pro? Do you understand german? |
Greg Schmidt (Gschmidt2)
New member Username: Gschmidt2
Post Number: 132 Registered: 1-2007
| | Posted on Monday, January 17, 2011 - 4:47 pm: | |
I use XP Pro (also I don't understand German). I think the problem could be that you are starting with a demo version which has locked .zd2 files (see message below). You could try downloading the version from this site at: http://www.zillions-of-games.com/demo/ Then unlock it. That's what I have done and I don't seem to end up with zd2 files. ------------------------------------------- Jeff Mallett (Jeffm) Posted on Saturday, December 28, 2002 - 4:12 pm: -------------------------------------------------------------------------------- Ken, Viewing/Editing the rules files of the locked demo has never been allowed in any version of Zillions. |
Andreas Speiger (Andique)
New member Username: Andique
Post Number: 11 Registered: 11-2007
| | Posted on Monday, January 17, 2011 - 4:57 pm: | |
i have solved the problem with this files. I know what to do. The question was sent to Phoenix to help him. This files are a result of a faultily installation. It's important to know what version of windows he uses to help him. |
Phoenix T'KAR (Tkr101010) New member Username: Tkr101010
Post Number: 5 Registered: 1-2011
| | Posted on Monday, January 17, 2011 - 5:42 pm: | |
I'm using Win 7 Home Premium, and version 2.0.1 of Zillions-Of-Games. I lived in Germany about 20 years ago, but I don't understand much these days due to not having used it for so long. |
Andreas Speiger (Andique)
New member Username: Andique
Post Number: 12 Registered: 11-2007
| | Posted on Monday, January 17, 2011 - 6:14 pm: | |
I don't know Win7. I can try to explain, what i have done on WinXP Home. You need full access as an administrator. First you uninstall zillions (best with an uninstaller programm like revo uninstaller). Then you make a right-click on the program-folder. In the german version it is C:\Programme. In the english version it is (i think) C:\program-files. Within the context-menue you click the last entry. In german ver. it is "Eigenschaften". In english ver. it is "properties", i think. Go on the tab "security", "Sicherheit" in german. Now you must give the program-folder "full-access", in german "Vollzugriff". You make a checkmark in every empty field. Short: you must change the security-rights of the program-folder. Better is to do this on the root C:\ and you take it over for every folder/file below the root. Then you install zillions new. This is what i have done on WinXP Home (it was more difficult, because i had to download a short program to install the tab "security"; in XP pro there is such an tab present, in XP Home not present). But i don't know, how it's working on Win7. I hope, i was able to help you. |
Phoenix T'KAR (Tkr101010) New member Username: Tkr101010
Post Number: 6 Registered: 1-2011
| | Posted on Monday, January 17, 2011 - 6:59 pm: | |
OK, I tried following your advice, but it looks like the difference between XP and Win7 kicks in at the point where you need to change the security setting for the Program Files. BUT I had previous installed with the Zill201pMSI.exe file, and decided to download the Zill201p.exe instead this time. I'm not sure why there's a difference between the two but the Zill201p.exe file installs the rules files with .zrf files instead of .zd2 files, so the situation is fixed now. Now to go figure out this add-partial thing ... |
Sean Duggan (Dream)
New member Username: Dream
Post Number: 76 Registered: 9-2000
| | Posted on Monday, January 17, 2011 - 10:39 pm: | |
.zd2 were Zillion Demo files, either compiled or encrypted from .zrf files, and distributed with one of the early demo versions. Basically, at one point the shareware version didn't even expand out the game files in an attempt to sell the system more effectively to the consumer. I remember in at least one case seeing them left there when upgrading an install. I thought they'd updated it to no longer use those. |