Hallo erstma,
Ich versuche grad einen Change Party Script (die man aus dem Menü rufen kann) zu finden.
(Change Party = Mitglieder auswechseln)
Aber in diesem Forum fand ich keins. In rmxp.net (rmxp.org fand ich keins) komm ich nicht rein. Ist glaub ich down. Bei Dubealex's Forum hab ich auch nachgeschaut aber da war nur eins die wiederum nicht funtzt.
Hat jemand von euch vielleicht so ein Script?
Ich versuche grad einen Change Party Script (die man aus dem Menü rufen kann) zu finden.
(Change Party = Mitglieder auswechseln)
Aber in diesem Forum fand ich keins. In rmxp.net (rmxp.org fand ich keins) komm ich nicht rein. Ist glaub ich down. Bei Dubealex's Forum hab ich auch nachgeschaut aber da war nur eins die wiederum nicht funtzt.
Hat jemand von euch vielleicht so ein Script?
Ich hab ein schönes auf die schnelle gefunden, aber @ doublealex Forum
[acht]Importiere dieses Charset in deinen Character Ordner

[/acht]
Dann der Code ein neues Skript über Main
[button="Skript"]
[/button]
[info]Aufrufbar ist es dann Ingame mit Call Skript[/info]
Für Party Change
Für Class Change
Demo Download
[acht]Zur Ergänzung 2 Screenshots auf Spoiler klicken![button="Screenshots"]
[/button][/acht]
[stop]Link zum Originalthread hier (man muss im Forum angemeldet sein um es Lesen zu können) -> http://www.dubealex.com/asylum/index.php?showtopic=5182&hl=[/stop]
~MFG Kain~
[COLOR="green"][/COLOR]
[acht]Importiere dieses Charset in deinen Character Ordner

[/acht]
Dann der Code ein neues Skript über Main
[button="Skript"]
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 |
#==============================================================================
# Party & Class Changing System
#--------------------------------------------------------------------------
# Created By SephirothSpawn (11.27.05)
# Last Updated: 11.30.05
#==============================================================================
#==============================================================================
# Class Scene Title
#==============================================================================
class Scene_Title
#--------------------------------------------------------------------------
# * Alias' New Game Method
#--------------------------------------------------------------------------
alias new_game command_new_game
#--------------------------------------------------------------------------
# * Adds Base Stats For Enemies
#--------------------------------------------------------------------------
def command_new_game
# Sets Class Requirements
for i in 1...$data_classes.size
$data_classes[i].set_reqirements
end
# Sets Characters Sex
for i in 1...$data_actors.size
$data_actors[i].set_sex
end
new_game
end
end
#==============================================================================
# ** Module RPG
#==============================================================================
module RPG
#===========================================================================
# ** Class Actor
#===========================================================================
class Actor
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :sex
#--------------------------------------------------------------------------
# * Set Sex
#--------------------------------------------------------------------------
def set_sex
if @name.include?('(')
@sex = @name.slice!(@name.index('(')..@name.index(')')) == '(M)' ? 1 : 2
else
@sex = 1
end
end
end
#===========================================================================
# ** Class Class
#===========================================================================
class Class
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :level_requirements
attr_accessor :sex_requirements
#--------------------------------------------------------------------------
# * Set Requirements
#--------------------------------------------------------------------------
def set_reqirements
# Sets Level Requirements
@level_requirements = @name.include?('{') ?
eval (@name.slice!(@name.index('{')..@name.index('}'))) : {}
# Sets Sex Requirements
if @name.include?('(')
sex = @name.slice!(@name.index('(')..@name.index(')'))
@sex_requirements = sex == '(M)' ? 1 : 2
else
@sex_requirements = 0
end
end
end
end
#==============================================================================
# ** Class Window_Base
#==============================================================================
class Window_Base
#--------------------------------------------------------------------------
# * Draw Item Name
# item : item
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw text width
# align : text align
#--------------------------------------------------------------------------
def draw_item_name(item, x, y, width = 212, align = 0, type = 0)
if item == nil
case type
when 0 # Weapon
bitmap = RPG::Cache.icon("001-Weapon01")
when 1 # Shield
bitmap = RPG::Cache.icon("009-Shield01")
when 2 # Helmet
bitmap = RPG::Cache.icon("010-Head01")
when 3 # Armor
bitmap = RPG::Cache.icon("014-Body02")
when 4 # Accessory
bitmap = RPG::Cache.icon("016-Accessory01")
end
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), disabled_color.alpha)
self.contents.font.color = disabled_color
self.contents.draw_text(x + 28, y, width - 28, 32, "Nothing Equipped", align)
return
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.font.color = normal_color
self.contents.draw_text(x + 28, y, width - 28, 32, item.name, align)
end
#--------------------------------------------------------------------------
# * Draw Sprite
#--------------------------------------------------------------------------
def draw_sprite(x, y, name, hue, pose, frame, actor_contents = true)
bitmap = RPG::Cache.character(name, hue)
cw = bitmap.width / 4
ch = bitmap.height / 4
# Facing Direction
case pose
when 0 ;a = 0 # Down
when 1 ;a = ch # Left
when 2 ;a = ch * 3 # Up
when 3 ;a = ch * 2 # Right
end
# Current Animation Slide
case frame
when 0 ;b = 0
when 1 ;b = cw
when 2 ;b = cw * 2
when 3 ;b = cw * 3
end
# Bitmap Rectange
src_rect = Rect.new(b, a, cw, ch)
# Draws Bitmap
if actor_contents
@sprite_contents.bitmap.blt(x - cw / 2, y - ch, bitmap, src_rect)
else
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
end
#--------------------------------------------------------------------------
# Draw Bar
# Credit Near Fantastica for Orginal Script
#--------------------------------------------------------------------------
def draw_bar(x, y, min, max, width = 152, height = 20)
self.contents.fill_rect(x, y, width, height, Color.new(255, 255, 255, 100))
bar_color = Color.new(0, 0, 200, 255)
for i in 0..(width * min / max)
r = bar_color.red * (width - i) / width + 0 * i / width
g = bar_color.green * (width - i) / width + 0 * i / width
b = bar_color.blue * (width - i) / width + 0 * i / width
a = bar_color.alpha * (width - i) / width + 255 * i / width
self.contents.fill_rect(x + i, y, 1 , height, Color.new(r, g, b, a))
end
end
#--------------------------------------------------------------------------
# * Alias Update
#--------------------------------------------------------------------------
alias sprite_update update
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
sprite_update
unless @sprite_contents == nil
@sprite_contents.x = self.x + self.ox + 16
@sprite_contents.y = self.y + self.oy + 16
end
end
#--------------------------------------------------------------------------
# * Alias Dispose
#--------------------------------------------------------------------------
alias sprite_dispose dispose
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
def dispose
sprite_dispose
unless @sprite_contents == nil
@sprite_contents.dispose
@sprite_contents.dispose
end
end
end
#==============================================================================
# ** Window_Selectable
#==============================================================================
class Window_Selectable < Window_Base
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :cursor_height
#--------------------------------------------------------------------------
# * Alias Initialization
#--------------------------------------------------------------------------
alias custom_int initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
custom_int(x, y, width, height)
@cursor_height = 32
end
#--------------------------------------------------------------------------
# * Get Top Row
#--------------------------------------------------------------------------
def top_row
# Divide y-coordinate of window contents transfer origin by 1 row
# height of @cursor_height
return self.oy / @cursor_height
end
#--------------------------------------------------------------------------
# * Set Top Row
# row : row shown on top
#--------------------------------------------------------------------------
def top_row=(row)
# If row is less than 0, change it to 0
if row < 0
row = 0
end
# If row exceeds row_max - 1, change it to row_max - 1
if row > row_max - 1
row = row_max - 1
end
# Multiply 1 row height by 32 for y-coordinate of window contents
# transfer origin
self.oy = row * @cursor_height
end
#--------------------------------------------------------------------------
# * Get Number of Rows Displayable on 1 Page
#--------------------------------------------------------------------------
def page_row_max
# Subtract a frame height of 32 from the window height, and divide it by
# 1 row height of @cursor_height
return (self.height - 32) / @cursor_height
end
#--------------------------------------------------------------------------
# * Update Cursor Rectangle
#--------------------------------------------------------------------------
def update_cursor_rect
# If cursor position is less than 0
if @index < 0
self.cursor_rect.empty
return
end
# Get current row
row = @index / @column_max
# If current row is before top row
if row < self.top_row
# Scroll so that current row becomes top row
self.top_row = row
end
# If current row is more to back than back row
if row > self.top_row + (self.page_row_max - 1)
# Scroll so that current row becomes back row
self.top_row = row - (self.page_row_max - 1)
end
# Calculate cursor width
cursor_width = self.width / @column_max - 32
# Calculate cursor coordinates
x = @index % @column_max * (cursor_width + 32)
y = @index / @column_max * @cursor_height - self.oy
if self.active == true
# Update cursor rectangle
self.cursor_rect.set(x, y, cursor_width, @cursor_height)
end
end
end
#==============================================================================
# ** Window_Command
#==============================================================================
class Window_Command < Window_Selectable
#--------------------------------------------------------------------------
# * Unisable Item
# index : item number
#--------------------------------------------------------------------------
def undisable_item(index)
draw_item(index, normal_color)
end
end
#==============================================================================
# ** Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :class_levels
attr_accessor :class_exp
attr_accessor :class_skills
attr_accessor :sex
#--------------------------------------------------------------------------
# * Alias Setup
#--------------------------------------------------------------------------
alias class_setup setup
#--------------------------------------------------------------------------
# * Setup
#--------------------------------------------------------------------------
def setup(actor_id)
class_setup(actor_id)
@class_levels, @class_exp, @class_skills = [nil], [nil], [nil]
for i in 0...$data_classes.size
@class_levels.push(1)
@class_exp.push(0)
@class_skills.push([])
end
@sex = $data_actors[actor_id].sex
end
#--------------------------------------------------------------------------
# * Switch Class
#--------------------------------------------------------------------------
def switch_class(class_id)
# Updates Class Arrays
@class_levels[@class_id ] = @level
@class_exp[@class_id] = @exp
@class_skills[@class_id] = @skills
# Loads New Class ID
@class_id = class_id
# Loads Class Level & Exp Count
@level = @class_levels[class_id]
@exp = @class_exp[class_id]
@skills = @class_skills[class_id]
end
#--------------------------------------------------------------------------
# * Update Levels & Exp
#--------------------------------------------------------------------------
def update_classes
# Updates Class Arrays
@class_levels[@class_id ] = @level
@class_exp[@class_id] = @exp
@class_skills[@class_id] = @skills
end
end
#==============================================================================
# ** Class Game_Party
#==============================================================================
class Game_Party
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :reserve_actors
#--------------------------------------------------------------------------
# * Alias Initialization
#--------------------------------------------------------------------------
alias reserve_initialize initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
reserve_initialize
@reserve_actors = []
end
#--------------------------------------------------------------------------
# * Add an Actor
# actor_id : actor ID
#--------------------------------------------------------------------------
def add_actor(actor_id)
# Get actor
actor = $game_actors[actor_id]
# If the party has less than 4 members and this actor is not in the party
if @actors.size < 4 and not @actors.include?(actor)
# Add actor
@actors.push(actor)
# Refresh player
$game_player.refresh
elsif @actors.size >= 4 and not @actors.include?(actor) and not @reserve_actors.include?(actor)
# Add actor
@reserve_actors.push(actor)
# Refresh player
$game_player.refresh
end
end
#--------------------------------------------------------------------------
# * Move To Reserve
# actor_id : actor ID
#--------------------------------------------------------------------------
def move_to_reserve(actor_id)
# Get actor
actor = $game_actors[actor_id]
if @actors.include?(actor)
@actors.delete(actor)
@reserve_actors.push(actor)
end
# Refresh player
$game_player.refresh
end
#--------------------------------------------------------------------------
# * Move To Party
# actor_id : actor ID
#--------------------------------------------------------------------------
def move_to_party(actor_id)
# Get actor
actor = $game_actors[actor_id]
if @reserve_actors.include?(actor)
@reserve_actors.delete(actor)
@actors.push(actor)
end
# Refresh player
$game_player.refresh
end
end
#==============================================================================
# ** Window_Member_Sprites
#==============================================================================
class Window_Member_Sprites < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x = 0, y = 384, width = 160)
super(x, y, width, 96)
self.z = 500
# Creates Contents
self.contents = Bitmap.new(width - 32, height - 32)
@sprite_contents = Sprite.new
@sprite_contents.bitmap = Bitmap.new(width - 32, height - 32)
@sprite_contents.z = 505
self.contents.font.size = 10
# Animation Varaibles
@pose, @frame = 0, 0
# Updates Window
update
end
#--------------------------------------------------------------------------
# * Refresh
# actors : $game_party.actors or $game_party.reserve_actors
#--------------------------------------------------------------------------
def refresh(actors)
# Clears Contents
contents.clear
@sprite_contents.bitmap.clear
# Stores Actors
@actors = actors.dup
# Adds Blank Actors
max = @actors == $game_party.actors ? 3 : 14
@actors.push(nil) until @actors.size > max
# Draw Sprites
draw_sprites
# Draws Info
draw_info
end
#--------------------------------------------------------------------------
# Draw Sprites
#--------------------------------------------------------------------------
def draw_sprites
@sprite_contents.bitmap.clear
for i in 0...@actors.size
actor = @actors[i]
if actor == nil
draw_sprite(i * 32 + 16, 64, "Empty", 0, @pose, @frame)
else
draw_sprite(i * 32 + 16, 64, actor.character_name, actor.character_hue , @pose, @frame)
end
end
end
#--------------------------------------------------------------------------
# Draw Information
#--------------------------------------------------------------------------
def draw_info
contents.clear
for i in 0...@actors.size
actor = @actors[i]
if actor == nil
contents.font.color = disabled_color
contents.draw_text(i * 32, 0, 32, 12, "Empty", 1)
else
contents.font.color = normal_color
contents.draw_text(i * 32, 0, 32, 12, actor.name, 1)
end
end
end
#--------------------------------------------------------------------------
# Frame Update
#--------------------------------------------------------------------------
def frame_update
@frame == 3 ? @frame = 0 : @frame += 1
draw_sprites
end
#--------------------------------------------------------------------------
# * Update Cursor Rectangle
#--------------------------------------------------------------------------
def update_cursor_rect(index)
self.cursor_rect.set(index * 32, 0, 32, 64)
end
#--------------------------------------------------------------------------
# Update Pose
# direction : 0 - Left 1 - Right
#--------------------------------------------------------------------------
def update_pose(direction)
if direction == 0
@pose == 0 ? @pose = 3 : @pose -= 1
else
@pose == 3 ? @pose = 0 : @pose += 1
end
draw_sprites
end
end
#==============================================================================
# ** Window_Party_Changing
#==============================================================================
class Window_Party_Changing < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 288)
# Sets Cursor Height
self.cursor_height = 64
# Sets Index
self.index = 0
# Animated Sprite Counters
@pose, @frame = 0, 0
# Sets Up Window Contents
self.contents = Bitmap.new(width - 32, height - 32)
# Sprite Contents
@sprite_contents = Sprite.new
@sprite_contents.bitmap = Bitmap.new(width - 32, height - 32)
@sprite_contents.z = 500
# Updates Window
update
end
#--------------------------------------------------------------------------
# * Refresh
# actors : $game_party.actors or $game_party.reserve_actors
#--------------------------------------------------------------------------
def refresh(actors)
# Clears Contents
contents.clear
@sprite_contents.bitmap.clear
# Duplicates Actors
@actors = actors.dup
# Checks Actors List
max = @actors == $game_party.actors ? 3 : 0
@actors.push(nil) until @actors.size > max
# Sets Up Item Max
@item_max = @actors.size
# Draw Sprites
draw_sprites
# Draws Info
draw_info
end
#--------------------------------------------------------------------------
# Draws Sprites
#--------------------------------------------------------------------------
def draw_sprites
@sprite_contents.bitmap.clear
# Draws actors
for i in 0...@actors.size
actor = @actors[i]
y = i * 64 + 8
if actor == nil
draw_sprite(20, y + 48, "Empty", 0, @pose, @frame)
else
draw_sprite(20, y + 48, actor.character_name, actor.character_hue , @pose, @frame)
end
end
end
#--------------------------------------------------------------------------
# Draws Information
#--------------------------------------------------------------------------
def draw_info
contents.clear
# Draws actors
for i in 0...@actors.size
actor = @actors[i]
y = i * 64 + 8
if actor == nil
contents.font.size = 40
contents.font.color = disabled_color
contents.draw_text(60, y - 8, contents.width, 64, "Empty Position")
else
contents.font.size = 22
# Draws Name
contents.font.color = normal_color
contents.draw_text(60, y, 90, 24, actor.name)
# Draws Class
contents.draw_text(60, y + 24, 90, 24, $data_classes[actor.class_id].name)
# Draws Level
contents.font.color = system_color
contents.draw_text(160, y, 100, 24, "Level")
contents.font.color = normal_color
contents.draw_text(160, y, 100, 24, actor.level.to_s, 2)
# Draws State
state = make_battler_state_text(actor, 112, true)
contents.font.color = actor.hp == 0 ? knockout_color : normal_color
contents.draw_text(160, y + 24, 100, 24, state)
# Draws Experience
contents.font.color = system_color
contents.draw_text(274, y, 160, 24, "Exp")
contents.font.color = normal_color
contents.draw_text(274, y, 160, 24, actor.exp.to_s, 2)
# Draws Next Level Bar
draw_bar(270, y + 26, actor.exp, actor.next_exp_s.to_i, 168)
# Draws Next Level
contents.font.color = system_color
contents.draw_text(274, y + 24, 160, 24, "Next Level")
contents.font.color = normal_color
contents.draw_text(274, y + 24, 160, 24, actor.next_rest_exp_s.to_s, 2)
# Draw HP Bar
draw_bar(446, y + 2, actor.hp, actor.maxhp)
# Draw MP Bar
draw_bar(446, y + 26, actor.sp, actor.maxsp)
# Draws HP
contents.font.size = 22
contents.font.color = system_color
contents.draw_text(452, y, 160, 24, $data_system.words.hp)
contents.font.size = 16
contents.font.color = actor.hp == 0 ? knockout_color : normal_color
contents.draw_text(452, y, 140, 24, "#{actor.hp} / #{actor.maxhp}", 2)
# Draws SP
contents.font.size = 22
contents.font.color = system_color
contents.draw_text(452, y + 24, 160, 24, $data_system.words.sp)
contents.font.size = 16
contents.font.color = actor.sp == 0 ? knockout_color : normal_color
contents.draw_text(452, y + 24, 140, 24, "#{actor.sp} / #{actor.maxsp}", 2)
end
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def frame_update
@frame == 3 ? @frame = 0 : @frame += 1
draw_sprites
end
#--------------------------------------------------------------------------
# * Update Pose
# direction : 0 - Left 1 - Right
#--------------------------------------------------------------------------
def update_pose(direction)
if direction == 0
@pose == 0 ? @pose = 3 : @pose -= 1
else
@pose == 3 ? @pose = 0 : @pose += 1
end
draw_sprites
end
end
#==============================================================================
# ** Window Class Changing
#==============================================================================
class Window_Class_Changing < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 64, 160, 320)
# Sets Cursor Height
self.cursor_height = 72
# Sets Index
self.index = 0
# Animated Sprite Counters
@pose, @frame = 0, 0
# Window Contents
self.contents = Bitmap.new(width - 32, height - 32)
# Refreshes Window Contents
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# Clears Contents
contents.clear
# Duplicates Actors
@actors = $game_party.actors.dup
# Checks Actors List
@actors.push(nil) until @actors.size > 3
# Sets Up Item Max
@item_max = @actors.size
# Draw Actors Info
contents.clear
for i in 0...@item_max
actor = @actors[i]
y = i * 72
# Draws Animated Sprite
if actor == nil
draw_sprite(20, y + 66, "Empty", 0, @pose, @frame, false)
contents.font.color = disabled_color
contents.draw_text(32, y + 2, contents.width - 40, 24, "", 2)
contents.draw_text(32, y + 24, contents.width - 40, 24, "Empty", 2)
contents.draw_text(32, y + 46, contents.width - 40, 24, "", 2)
else
draw_sprite(20, y + 66, actor.character_name, actor.character_hue , @pose, @frame, false)
contents.font.color = normal_color
# Draws Name
contents.draw_text(32, y + 2, contents.width - 40, 24, actor.name, 2)
# Draws Class
contents.draw_text(32, y + 24, contents.width - 40, 24, $data_classes[actor.class_id].name, 2)
# Draws Level
contents.draw_text(32, y + 46, contents.width - 40, 24, "Level: #{actor.level}", 2)
end
end
end
# Frame Update
#--------------------------------------------------------------------------
def frame_update
@frame == 3 ? @frame = 0 : @frame += 1
refresh
end
#--------------------------------------------------------------------------
# Update Pose
# direction : 0 - Left 1 - Right
#--------------------------------------------------------------------------
def update_pose(direction)
if direction == 0
@pose == 0 ? @pose = 3 : @pose -= 1
else
@pose == 3 ? @pose = 0 : @pose += 1
end
refresh
end
end
#==============================================================================
# ** Window Character Status
#==============================================================================
class Window_Character_Status < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
#--------------------------------------------------------------------------
def initialize
super(160, 64, 480, 416)
# Animation Varaibles
@pose, @frame = 0, 0
# Window Contents
self.contents = Bitmap.new(width - 32, height - 32)
# Refreshes Contents
refresh($game_party.actors[0])
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh(actor)
# Clears Contents
contents.clear
# Stores Actor
@actor = actor
if actor == nil
draw_sprite(contents.width / 2, contents.height / 2, "Empty", 0, @pose, @frame, false)
# Draws Empty Text
contents.font.size = 48
contents.font.color = system_color
contents.font.color.alpha = disabled_color.alpha
contents.draw_text(0, contents.height / 2, contents.width, 48, "Empty Position", 1)
else
draw_sprite(40, 80, actor.character_name, actor.character_hue , @pose, @frame, false)
contents.font.size = 22
contents.font.color = normal_color
# Draws Name
contents.draw_text(-8, 4, 96, 24, actor.name, 1)
# Draws State
state = make_battler_state_text(actor, 112, true)
contents.font.color = actor.hp == 0 ? knockout_color : normal_color
contents.draw_text(96, 8, 96, 24, state, 1)
# Draws Class
contents.font.color = system_color
contents.draw_text(96, 32, 96, 24, actor.class_name, 1)
# Draws Level
contents.font.color = system_color
contents.draw_text(96, 56, 96, 24, "Level :")
contents.font.color = normal_color
contents.draw_text(96, 56, 96, 24, actor.level.to_s, 2)
# Draws Experience
contents.font.color = system_color
contents.draw_text(224, 8, 224, 24, "Experience :")
contents.font.color = normal_color
contents.draw_text(216, 8, 224, 24, actor.exp_s, 2)
# Next Level Experience
contents.font.color = system_color
contents.draw_text(224, 32, 224, 24, "Next Level :")
contents.font.color = normal_color
contents.draw_text(216, 32, 224, 24, actor.next_rest_exp_s, 2)
# Draws Next Level Bar
draw_bar(224, 58, actor.exp, actor.next_exp_s.to_i, 216)
# Draws HP Bar
draw_bar(32, 126, actor.hp, actor.maxhp, 228, 24)
# Draws HP
contents.font.color = system_color
contents.draw_text(40, 126, 224, 24, "HP")
contents.font.color = normal_color
contents.draw_text(32, 126, 224, 24, "#{actor.hp} / #{actor.maxhp}", 2)
# Draws SP Bar
draw_bar(32, 158, actor.sp, actor.maxsp, 228, 24)
# Draws SP
contents.font.color = system_color
contents.draw_text(40, 158, 224, 24, "SP")
contents.font.color = normal_color
contents.draw_text(32, 158, 224, 24, "#{actor.sp} / #{actor.maxsp}", 2)
# Draws Equiped Items
draw_item_name($data_weapons[actor.weapon_id], 36, 190, 224, 2, 0)
draw_item_name($data_armors[actor.armor1_id], 36, 222, 224, 2, 1)
draw_item_name($data_armors[actor.armor2_id], 36, 254, 224, 2, 2)
draw_item_name($data_armors[actor.armor3_id], 36, 286, 224, 2, 3)
draw_item_name($data_armors[actor.armor4_id], 36, 318, 224, 2, 4)
# Draws Stats
stat_names = [$data_system.words.str, $data_system.words.dex, $data_system.words.agi,
$data_system.words.int, $data_system.words.atk, $data_system.words.pdef, $data_system.words.mdef, "Evasion"]
stats = [actor.str, actor.dex, actor.agi, actor.int, actor.atk, actor.pdef, actor.mdef, actor.eva]
for i in 0...stats.size
contents.font.color = system_color
contents.draw_text(278, 108 + i * 32, 170, 24, stat_names[i])
contents.font.color = normal_color
contents.draw_text(270, 108 + i * 32, 170, 24, stats[i].to_s, 2)
end
end
end
#--------------------------------------------------------------------------
# Frame Update
#--------------------------------------------------------------------------
def frame_update
@frame == 3 ? @frame = 0 : @frame += 1
refresh(@actor)
end
#--------------------------------------------------------------------------
# Update Pose
# direction : 0 - Left 1 - Right
#--------------------------------------------------------------------------
def update_pose(direction)
if direction == 0
@pose == 0 ? @pose = 3 : @pose -= 1
else
@pose == 3 ? @pose = 0 : @pose += 1
end
refresh(@actor)
end
end
#==============================================================================
# ** Window_Class_Status
#==============================================================================
class Window_Class_Status < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(160, 64, 480, 416)
# Creates Contents
self.contents = Bitmap.new(width - 32, height - 32)
# Animation Varaibles
@pose, @frame = 0, 0
# Refreshes Contents
refresh($game_party.actors[0], $data_classes[1])
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh(actor, current_class)
# Clears Contents
contents.clear
# Requirements Met (For Return)
@requirements_met = true
# Stores Variables for Refreshing
@actor = actor
@current_class = current_class
# Draws Actors Info
contents.font.size = 22
contents.font.color = normal_color
# Draws Name of Actor
contents.draw_text(0, 4, contents.width / 3, 24, actor.name, 1)
# Draws Actor Sprite
draw_sprite(contents.width / 6, 82, actor.character_name, actor.character_hue , @pose, @frame, false)
# Current Class
contents.font.color = system_color
contents.draw_text(contents.width / 3 + 4, 4, contents.width / 3, 24, actor.class_name, 1)
# Current Level
contents.draw_text(contents.width / 3 + 4, 30, contents.width / 3, 24, "Level :")
contents.font.color = normal_color
contents.draw_text(contents.width / 3 - 4, 30, contents.width / 3, 24, actor.level.to_s, 2)
# Current Experience
contents.font.color = system_color
contents.draw_text(contents.width / 3 + 4, 56, contents.width / 3, 24, "Experience :")
contents.font.color = normal_color
contents.draw_text(contents.width / 3 - 4, 56, contents.width / 3, 24, actor.exp_s, 2)
# Checks to Make Sure Current Class isn't Nil
if current_class == nil
contents.font.size = 32
contents.font.color = system_color
contents.draw_text(0, contents.width / 2 - 18, contents.width, 36, "Return to Actors", 1)
else
contents.font.size = 22
contents.font.color = normal_color
# Next Class
contents.font.color = system_color
contents.draw_text(contents.width / 3 * 2 + 4 , 4, contents.width / 3, 26, current_class.name, 1)
# Next Level
contents.draw_text(contents.width / 3 * 2 + 4, 30, contents.width / 3, 26, "Level :")
contents.font.color = normal_color
contents.draw_text(contents.width / 3 * 2 - 4, 30, contents.width / 3, 26, actor.class_levels[current_class.id].to_s, 2)
# Next Experience
contents.font.color = system_color
contents.draw_text(contents.width / 3 * 2 + 4, 56, contents.width / 3, 26, "Experience :")
contents.font.color = normal_color
contents.draw_text(contents.width / 3 * 2 - 4, 56, contents.width / 3, 26, actor.class_exp[current_class.id].to_s, 2)
pos = current_class.position == 0 ? "Front Row" : current_class.position == 1 ? "Middle Row" : "Back Row"
contents.draw_text(0, 96, contents.width, 24, "#{current_class.name}: #{pos}", 1)
contents.font.color = system_color
# Draws Class Requirements
contents.draw_text(0, 120, contents.width, 24, "Requirements", 1)
contents.draw_text(4, 144, contents.width, 24, "Sex Requirement:")
# Sex Requirements
contents.font.color = normal_color
sex_req = current_class.sex_requirements
if sex_req == 0 or sex_req == actor.sex
contents.font.color = normal_color
else
contents.font.color = disabled_color
end
contents.draw_text(32, 168, contents.width, 24, sex_req == 0 ? "None" : sex_req == 1 ? "Male" : "Female")
contents.draw_text(- 8, 168, contents.width, 24, actor.sex == 1 ? "Male" : "Female", 2)
# Checks if Requirements met
@requirements_met = false unless sex_req == 0 or sex_req == actor.sex
# Class Level Requirements
contents.font.color = system_color
contents.draw_text(4, 192, contents.width, 24, "Class Requirement:")
contents.draw_text(32, 216, contents.width, 24, "Class")
contents.draw_text(160, 216, contents.width, 24, "Req. Level")
contents.draw_text(-8, 216, contents.width, 24, "Current Level", 2)
contents.font.color = normal_color
# Class Requirement Arrays
classes, level_reqs, levels = [], [], []
current_class.level_requirements.each_key { |key|
classes.push($data_classes[key].name)
level_reqs.push(current_class.level_requirements[key])
levels.push(actor.class_levels[$data_classes[key].id]) }
for i in 0...classes.size
if levels[i] >= level_reqs[i]
contents.font.color = normal_color
else
contents.font.color = disabled_color
@requirements_met = false
end
contents.draw_text(32, 240 + i * 24, contents.width, 24, classes[i])
contents.draw_text(160, 240 + i * 24, contents.width, 24, level_reqs[i].to_s)
contents.draw_text(-8, 240 + i * 24, contents.width, 24, levels[i].to_s, 2)
end
end
end
#--------------------------------------------------------------------------
# Frame Update
#--------------------------------------------------------------------------
def frame_update
@frame == 3 ? @frame = 0 : @frame += 1
refresh(@actor, @current_class)
end
#--------------------------------------------------------------------------
# Check Requirements
#--------------------------------------------------------------------------
def check
return @requirements_met
end
end
#==============================================================================
# ** Scene Party Changer
#==============================================================================
class Scene_Party_Changer
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Current Phase
@phase = 0
# Frame Update (For Sprite Animations)
@update_frame = 0
# Help Window
@help_window = Window_Help.new
@help_window.set_text("Select Member To Transfer to Reserves", 1)
@help_window.z = 9999
# Active Party Window
@active_actors_window = Window_Party_Changing.new
@active_actors_window.refresh($game_party.actors)
@active_actors_window.y = 64
# Reserve Party Window
@reserver_actors_window = Window_Party_Changing.new
@reserver_actors_window.refresh($game_party.reserve_actors)
@reserver_actors_window.y = 352
@reserver_actors_window.active = false
# Active Party Sprites
@active_actors_sprites = Window_Member_Sprites.new
@active_actors_sprites.refresh($game_party.actors)
@active_actors_sprites.update_cursor_rect(0)
# Reserve Party Sprites
@reserve_actors_sprites = Window_Member_Sprites.new(160, 384, 480)
@reserve_actors_sprites.refresh($game_party.reserve_actors)
@reserve_actors_sprites.update_cursor_rect(0)
# Scene Objects
@objects = [@help_window, @active_actors_window, @reserver_actors_window,
@active_actors_sprites, @reserve_actors_sprites]
Graphics.transition
# Main loop
while $scene == self
# Update game screen
Graphics.update
# Update input information
Input.update
# Objects Update
@objects.each {|x| x.update}
# Animated Sprites Update
@update_frame += 1
if @update_frame == 10
@update_frame = 0
@objects.each {|x| x.frame_update unless x == @help_window}
end
# Updates Poses
if Input.trigger?(Input::RIGHT)
$game_system.se_play($data_system.cursor_se)
@objects.each {|x| x.update_pose(0) unless x == @help_window}
elsif Input.trigger?(Input::LEFT)
$game_system.se_play($data_system.cursor_se)
@objects.each {|x| x.update_pose(1) unless x == @help_window}
end
# Frame update
@phase == 0 ? active_update : reserve_update
end
# Prepare for transition
Graphics.freeze
# Disposes Objects
@objects.each {|x| x.dispose}
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def active_update
# Slides Windows
@active_actors_window.y += 8 if @active_actors_window.y < 64
@reserver_actors_window.y += 8 if @reserver_actors_window.y < 352
# Updates Cursor Rectangles
if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
@active_actors_sprites.update_cursor_rect(@active_actors_window.index)
# Exits Scene
elsif Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
# Selects Party Spot to Switch Spot With
elsif Input.trigger?(Input::C)
actor = $game_party.actors[@active_actors_window.index]
if $game_party.reserve_actors.size == 0
$game_system.se_play($data_system.buzzer_se)
@help_window.set_text("No Reserve Actors to Switch With", 1)
else
$game_system.se_play($data_system.decision_se)
@active_actors_window.active = false
@reserver_actors_window.active = true
text = actor == nil ?
"Select Member to Add to Party" : "Select Member to Switch Spots with #{actor.name}"
@help_window.set_text(text, 1)
@phase = 1
end
end
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def reserve_update
# Slides Windows
@active_actors_window.y -= 8 if @active_actors_window.y > -192
@reserver_actors_window.y -= 8 if @reserver_actors_window.y > 96
# Updates Cursor Rectangles
if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
@reserve_actors_sprites.update_cursor_rect(@reserver_actors_window.index)
# Returns to Main Phase
elsif Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@help_window.set_text("Select Member To Transfer to Reserves", 1)
@active_actors_window.active = true
@reserver_actors_window.active = false
@phase = 0
end
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
active_member = $game_party.actors[@active_actors_window.index]
reserve_member = $game_party.reserve_actors[@reserver_actors_window.index]
$game_party.move_to_reserve(active_member.id) unless active_member == nil
$game_party.move_to_party(reserve_member.id)
[@active_actors_window, @active_actors_sprites].each {|x| x.refresh($game_party.actors)}
[@reserver_actors_window, @reserve_actors_sprites].each {|x| x.refresh($game_party.reserve_actors)}
@active_actors_window.active = true
@reserver_actors_window.active = false
@phase = 0
end
end
end
#==============================================================================
# ** Scene Class Changer
#==============================================================================
class Scene_Class_Changer
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Updates Actors Class Arrays
for actor in $game_party.actors
actor.update_classes
end
# Frame Update (For Sprite Animations)
@update_frame = 0
# Help Window
@help_window = Window_Help.new
@help_window.set_text("Select Actor to Change Class", 1)
# Actors Window
@actors_window = Window_Class_Changing.new
# Class Window
commands = ["Back"]
for job in $data_classes
commands.push(job.name) unless job == nil
end
@class_window = Window_Command.new(160, commands)
@class_window.y = 64
@class_window.height = 320
@class_window.active = @class_window.visible = false
# Sprites Window
@sprites_window = Window_Member_Sprites.new
@sprites_window.refresh($game_party.actors)
@sprites_window.frame_update
@sprites_window.update_cursor_rect(0)
# Character Window
@character_status_window = Window_Character_Status.new
# Class Window
@class_status_window = Window_Class_Status.new
@class_status_window.visible = false
# Scene Objects
@objects = [@help_window, @actors_window, @class_window, @sprites_window,
@character_status_window, @class_status_window]
Graphics.transition
# Main loop
while $scene == self
# Update game screen
Graphics.update
# Update input information
Input.update
# Objects Update
@objects.each {|x| x.update}
# Animated Sprites Update
@update_frame += 1
if @update_frame == 5
@update_frame = 0
[@actors_window, @sprites_window, @character_status_window, @class_status_window].each {|x| x.frame_update unless x.visible == false}
end
# Frame update
update
end
# Prepare for transition
Graphics.freeze
# Disposes Objects
@objects.each {|x| x.dispose}
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
# Sets Disabled and Undisabled Items
if @class_window.active
for i in 1...$data_classes.size
if check_class($game_party.actors[@actors_window.index], $data_classes[i])
@class_window.undisable_item(i)
else
@class_window.disable_item(i)
end
end
end
# Updates Actor Cursor Rectangle
@sprites_window.update_cursor_rect(@actors_window.index)
# ~ Input Processing ~
if Input.trigger?(Input::RIGHT)
for actor in $game_party.actors
actor.exp += 100
end
end
if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
if @character_status_window.visible
@character_status_window.refresh($game_party.actors[@actors_window.index])
else
@class_status_window.refresh($game_party.actors[@actors_window.index], $data_classes[@class_window.index])
end
elsif Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
if @actors_window.active
$scene = Scene_Map.new
else
@class_window.index = 0
@actors_window.visible = @actors_window.active = true
@class_window.visible = @class_window.active = false
@character_status_window.visible = true
@class_status_window.visible = false
@character_status_window.refresh($game_party.actors[@actors_window.index])
end
elsif Input.trigger?(Input::C)
if @actors_window.active
if $game_party.actors[@actors_window.index] == nil
$game_system.se_play($data_system.buzzer_se)
else
$game_system.se_play($data_system.decision_se)
@actors_window.visible = @actors_window.active = false
@class_window.visible = @class_window.active = true
@index = @actors_window.index
@class_status_window.refresh($game_party.actors[@index], $data_classes[@class_window.index])
@character_status_window.visible = false
@class_status_window.visible = true
@help_window.set_text("Select Class to Change #{$game_party.actors[@index].name} To", 1)
end
else
if @class_window.index == 0
$game_system.se_play($data_system.decision_se)
@actors_window.visible = @actors_window.active = true
@class_window.visible = @class_window.active = false
@character_status_window.refresh($game_party.actors[@actors_window.index])
@character_status_window.visible = true
@class_status_window.visible = false
@help_window.set_text("Select Actor to Change Class", 1)
else
if @class_status_window.check
$game_system.se_play($data_system.decision_se)
class_ = $data_classes[@class_window.index]
$game_party.actors[@index].switch_class(class_.id)
@help_window.set_text("#{$game_party.actors[@index].name} Changed to a #{class_.name}", 1)
else
$game_system.se_play($data_system.buzzer_se)
@help_window.set_text("Class Requirements Not Met", 1)
end
end
end
end
end
#--------------------------------------------------------------------------
# * Check Class
#--------------------------------------------------------------------------
def check_class(actor, job)
requirements_met = true
sex_req = job.sex_requirements
requirements_met = false unless sex_req == 0 or sex_req == actor.sex
classes, level_reqs, levels = [], [], []
job.level_requirements.each_key { |key|
classes.push($data_classes[key].name)
level_reqs.push(job.level_requirements[key])
levels.push(actor.class_levels[$data_classes[key].id]) }
for i in 0...classes.size
unless levels[i] >= level_reqs[i]
requirements_met = false
end
end
return requirements_met
end
end |
[info]Aufrufbar ist es dann Ingame mit Call Skript[/info]
Für Party Change
|
|
Quellcode |
1 |
$scene = Scene_Party_Changer.new |
Für Class Change
|
|
Quellcode |
1 |
$scene = Scene_Class_Changer.new |
Demo Download
[acht]Zur Ergänzung 2 Screenshots auf Spoiler klicken![button="Screenshots"]
[/button][/acht][stop]Link zum Originalthread hier (man muss im Forum angemeldet sein um es Lesen zu können) -> http://www.dubealex.com/asylum/index.php?showtopic=5182&hl=[/stop]
~MFG Kain~
[COLOR="green"][/COLOR]
Hallo, ich habe ein Problem mit dem Script (denke ich).
Ich habe zwar das Charset und den Script aus der Demo herausgenommen aber in meinem eingenen Demoversuch wird die Schrift in den Fenstern nicht angezeigt.
Damit meine ich die Schrift von den Eigenschaften des jeweiligen Helden, e.tc. - also nur die Hilfeleiste klappt.
Erbitte um Hilfe, damit ich dieses Problem bei meinem richtigen Game nicht auch habe.
M.f.G. XplayerX
PS: Vielen Dank falls ich nochmal hilfe bekomme!
Edit: Danke und Entschuldige Monsta
Ich habe zwar das Charset und den Script aus der Demo herausgenommen aber in meinem eingenen Demoversuch wird die Schrift in den Fenstern nicht angezeigt.
Damit meine ich die Schrift von den Eigenschaften des jeweiligen Helden, e.tc. - also nur die Hilfeleiste klappt.
Erbitte um Hilfe, damit ich dieses Problem bei meinem richtigen Game nicht auch habe.
M.f.G. XplayerX
PS: Vielen Dank falls ich nochmal hilfe bekomme!

Edit: Danke und Entschuldige Monsta
Kann es sein, dass diese Frage hier täglich beantwortet wird???
http://scientia.rpgxp.de/wiki/index.php/Schriftdefinition
Also diesen Code ins Main einsetzen:
Monsta
http://scientia.rpgxp.de/wiki/index.php/Schriftdefinition
Also diesen Code ins Main einsetzen:
|
|
Quellcode |
1 2 |
$defaultfontype = $fontface = Font.default_name = "Arial" $defaultfontsize = $fontsize = Font.default_size = 24 |
Monsta
Skripte:
Animations "Entruckler"
Console
Drunken Mode
Eventskript Debugger
Flat-Events
Impassable Script
Item Shortcut
MSS: Monsta's Shoot System (Neu)
Radius Skript
Random Event Teleport
RMXP Leistungstest
Single Rotate
Split Screen (Beta)
Tutorials:
'alias' Bug beheben
Eigenes RTP
Standard KS komplett Übersetzen
RGSS: Eigener HUD
Programme:
Maker Exchange [ MEX ]
RMXP Skript Explorer
RPGXP Code Converter
Spiele:
[Minispiel] Stampfi V1.5 (Gold)
[Minispiel] Mastermind XP
[Humor] Verfressene Klone
______________________________
[Zukunft] Evil Science
zum Lesen den Text mit der Maus markieren
Hallo, ich habe mich jetzt nochmal damit eine ganze Zeit beschäftigt und mir scheinen da zwei Fehler unterlaufen zu sein :-(
Der 1.: Wenn man 4 Player in der Gruppe hat und noch weitere 4 in dem Skript (macht ja
und dann noch ein Player in dem Sript dazukommt, wird keine Grafik des Players angezeigt (4 in der Gruppe, 5 'in' dem Skript).
Der 2.: Bei dem Classenchange kann ich durch drücken der rechten Pfeiltaste die EXP anheben und das Level der Klasse erhöhern - was nicht passieren soll.
Hoffe mir kann jemand Helfen (versteht das überhaubt was ich mein ^^).
M.f.G. Maci
Danke im Voraus!
Der 1.: Wenn man 4 Player in der Gruppe hat und noch weitere 4 in dem Skript (macht ja
und dann noch ein Player in dem Sript dazukommt, wird keine Grafik des Players angezeigt (4 in der Gruppe, 5 'in' dem Skript).Der 2.: Bei dem Classenchange kann ich durch drücken der rechten Pfeiltaste die EXP anheben und das Level der Klasse erhöhern - was nicht passieren soll.
Hoffe mir kann jemand Helfen (versteht das überhaubt was ich mein ^^).
M.f.G. Maci
Danke im Voraus!
Hey Haku^^
Ich hab ein ganz nettes partymember script
klickst du hier --> http://forum.rpgxp.de/project/topic.php?…Party%20member&
Das ist ganz cool^^Sieht auch sehr schön im Menü aus!
für unendlich Partymembers°_°
Öhm ^^ ich würde gern nochmal drauf hinweisen, dass ich jemanden brauche, der mir dieses script modifiziert (dürfte schnell gehen^^).Wenn einer Lust hat -->
http://forum.rpgxp.de/project/topic.php?id=9142&
sry dass ich dein post ein bissl missbraucht habe._.
Ich hab ein ganz nettes partymember script
klickst du hier --> http://forum.rpgxp.de/project/topic.php?…Party%20member&
Das ist ganz cool^^Sieht auch sehr schön im Menü aus!
für unendlich Partymembers°_°
Öhm ^^ ich würde gern nochmal drauf hinweisen, dass ich jemanden brauche, der mir dieses script modifiziert (dürfte schnell gehen^^).Wenn einer Lust hat -->
http://forum.rpgxp.de/project/topic.php?id=9142&
sry dass ich dein post ein bissl missbraucht habe._.
Guter Vorschlag, aber ich würde das gerne irgendwie mit dem FFX-2 Menü verbungen haben...
Kannst du das? xD
Oder ein anderer? ^^
Hier nochmal das Skript vom FF-Menü (umgearbeitet xD)
#=========================================================
#Costum Menü, umgearbeitet von XplayerX
#=========================================================
class Bitmap
def draw_text_shadow_rect(rect, text, align = 0)
self.font.size -= 2
old_col = self.font.color.clone
# Dark shadow
self.font.color = Color.new(0,0,0, 255)
draw_text(Rect.new(rect.x+1, rect.y+1, rect.width,
rect.height), text, align)
# Small outline
self.font.color = Color.new(96,96,96,96)
draw_text(Rect.new(rect.x+1, rect.y, rect.width,
rect.height), text, align)
draw_text(Rect.new(rect.x-1, rect.y, rect.width,
rect.height), text, align)
draw_text(Rect.new(rect.x, rect.y-1, rect.width,
rect.height), text, align)
draw_text(Rect.new(rect.x, rect.y+1, rect.width,
rect.height), text, align)
# Normal text
self.font.color = old_col
draw_text(rect, text, align)
self.font.size += 2
end
def draw_text_shadow(x, y, wid, hei, text, align = 0)
self.font.size -= 2
old_col = self.font.color.clone
# Dark shadow
self.font.color = Color.new(0,0,0, 255)
draw_text(x+1,y+1,wid,hei,text, align)
# Small outline
self.font.color = Color.new(96,96,96,96)
draw_text(x+1,y,wid,hei,text, align)
draw_text(x+2,y,wid,hei,text, align)
draw_text(x+2,y,wid,hei,text, align)
draw_text(x,y-1,wid,hei,text, align)
draw_text(x,y+1,wid,hei,text, align)
draw_text(x,y+2,wid,hei,text, align)
# Normal
self.font.color = old_col
draw_text(x,y,wid,hei,text, align)
self.font.size += 2
end
def draw_text_outline(x, y, wid, hei, text, align = 0)
self.font.color = Color.new(0, 0, 0, 255)
draw_text(x + 1,y + 1,wid,hei,text, align)
draw_text(x + 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y + 1,wid,hei,text, align)
self.font.color = Color.new(255, 255, 255, 255)
draw_text(x,y,wid,hei,text, align)
end
def draw_text_outline2(x, y, wid, hei, text, align = 0)
self.font.color = Color.new(0, 0, 0, 255)
draw_text(x + 1,y + 1,wid,hei,text, align)
draw_text(x + 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y + 1,wid,hei,text, align)
self.font.color = Color.new(255, 255, 255, 200)
draw_text(x,y,wid,hei,text, align)
end
def draw_text_outline3(x, y, wid, hei, text, align = 0)
self.font.color = Color.new(0, 0, 0, 255)
draw_text(x + 1,y + 1,wid,hei,text, align)
draw_text(x + 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y + 1,wid,hei,text, align)
self.font.color = Color.new(192, 224, 255, 255)
draw_text(x,y,wid,hei,text, align)
end
def draw_text_outline4(x, y, wid, hei, text, align = 0)
self.font.color = Color.new(0, 0, 0, 190)
draw_text(x + 1,y + 1,wid,hei,text, align)
draw_text(x + 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y + 1,wid,hei,text, align)
self.font.color = Color.new(255, 255, 255, 255)
draw_text(x,y,wid,hei,text, align)
end
end
class Window_Base < Window
#=====================================
# Gradient Bars , thanks to Acedent Prone
def draw_normal_barz(x, y, type, length, thick, e1, e2, c1 = Color.new(255,0,0,255), c2 = Color.new(0,0,0,255))
if type == "horizontal"
width = length
height = thick
self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
w = width * e1 / e2
for i in 0..height
r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
end
elsif type == "vertical"
width = thick
height = length
self.contents.fill_rect(x-1, y - 1, width+3, height + 2, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255))
h = height * e1 / e2
for i in 0..width
r = c1.red + (c2.red - c1.red) * (width -i)/width + 0 * i/width
g = c1.green + (c2.green - c1.green) * (width -i)/width + 0 * i/width
b = c1.blue + (c2.blue - c1.blue) * (width -i)/width + 0 * i/width
a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width + 255 * i/width
self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a))
end
end
end
def draw_actor_barz(actor,x, y, type, length, thick, e1, e2, c1 = Color.new(255,0,0,255), c2 = Color.new(0,0,0,255))
if type == "horizontal"
width = length
height = thick
self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(0, 0, 0, 255))
self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
w = width * e1 / e2
for i in 0..height
r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
end
elsif type == "vertical"
width = thick
height = length
self.contents.fill_rect(x-1, y - 1, width+3, height + 2, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255))
h = height * e1 / e2
for i in 0..width
r = c1.red + (c2.red - c1.red) * (width -i)/width + 0 * i/width
g = c1.green + (c2.green - c1.green) * (width -i)/width + 0 * i/width
b = c1.blue + (c2.blue - c1.blue) * (width -i)/width + 0 * i/width
a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width + 255 * i/width
self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a))
end
end
end
#=====================================
# New definitions
def draw_battlegraphic(actor, x, y)
bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
#======================================
def draw_actor_statuswindow(actor, x, y)
bitmap = RPG::Cache.picture(actor.character_name, actor.character_hue)
cw = bitmap.width / 4
ch = bitmap.height / 4
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
#=====================================
def draw_actor_face(actor, x, y)
face = RPG::Cache.character("Faces/" + actor.character_name, actor.character_hue)
fw = face.width
fh = face.height
src_rect = Rect.new(0, 0, fw, fh)
self.contents.blt(x - fw / 23, y - fh, face, src_rect)
end
#=====================================
def draw_actor_name2(actor, x, y)
self.contents.font.name = $fontface
self.contents.font.color = outline_color
self.contents.draw_text(x - 1, y - 1, 120, 32, actor.name)
self.contents.draw_text(x + 1, y - 1, 120, 32, actor.name)
self.contents.draw_text(x + 1, y + 1, 120, 32, actor.name)
self.contents.draw_text(x - 1, y + 1, 120, 32, actor.name)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 120, 32, actor.name)
end
#=====================================
def draw_actor_level2(actor, x, y)
self.contents.font.name = $fontface
self.contents.font.color = outline_color
self.contents.draw_text(x - 1, y - 1, 32, 32, "Lvl.")
self.contents.draw_text(x - 1, y + 1, 32, 32, "Lvl.")
self.contents.draw_text(x + 1, y - 1, 32, 32, "Lvl.")
self.contents.draw_text(x + 1, y + 1, 32, 32, "Lvl.")
self.contents.font.color = Color.new(254, 230, 159, 255)
self.contents.draw_text(x, y, 32, 32, "Lvl.")
self.contents.font.color = outline_color
self.contents.draw_text(x + 31, y + 1, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(x + 31, y - 1, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(x + 33, y + 1, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(x + 33, y - 1, 24, 32, actor.level.to_s, 2)
self.contents.font.color = normal_color
self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
end
#=====================================
def draw_actor_class2(actor, x, y)
self.contents.font.name = "Monotype Corsiva"
self.contents.font.color = outline_color
self.contents.draw_text(x + 1, y + 1, 100, 32, actor.class_name)
self.contents.draw_text(x + 1, y - 1, 100, 32, actor.class_name)
self.contents.draw_text(x - 1, y + 1, 100, 32, actor.class_name)
self.contents.draw_text(x - 1, y - 1, 100, 32, actor.class_name)
self.contents.font.color = Color.new(238, 139, 254, 255)
self.contents.draw_text(x, y, 100, 32, actor.class_name)
end
#======================================
def draw_actor_hp2(actor, x, y, width = 144)
self.contents.font.name = "Tahoma"
# 文字列 "HP" を描画
self.contents.font.size = 24
self.contents.font.color = outline_color
self.contents.draw_text(x + 1, y + 1, 32, 32, $data_system.words.hp)
self.contents.draw_text(x + 1, y - 1, 32, 32, $data_system.words.hp)
self.contents.draw_text(x - 1, y - 1, 32, 32, $data_system.words.hp)
self.contents.draw_text(x - 1, y + 1, 32, 32, $data_system.words.hp)
self.contents.font.color = Color.new(254, 238, 189, 255)
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
# MaxHP を描画するスペースがあるか計算
if width - 32 >= 108
hp_x = x + width - 108
flag = true
elsif width - 32 >= 48
hp_x = x + width - 48
flag = false
end
# HP を描画
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.contents.font.color = outline_color
self.contents.draw_text(hp_x - 1, y - 1, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x - 1, y + 1, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x + 1, y + 1, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x + 1, y - 1, 48, 32, actor.hp.to_s, 2)
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
# MaxHP を描画
if flag
self.contents.font.color = outline_color
self.contents.draw_text(hp_x + 60 - 1, y - 1, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 60 - 1, y + 1, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 60 + 1, y - 1, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 60 + 1, y + 1, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 48 - 1, y - 1, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 48 + 1, y + 1, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 48 - 1, y + 1, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 48 + 1, y - 1, 12, 32, "/", 1)
self.contents.font.color = normal_color
self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
end
end
#============================================
def draw_actor_sp2(actor, x, y, width = 144)
self.contents.font.name = "Tahoma"
# 文字列 "MP" を描画
self.contents.font.size = 24
self.contents.font.color = outline_color
self.contents.draw_text(x + 1, y + 1, 32, 32, $data_system.words.sp)
self.contents.draw_text(x + 1, y - 1, 32, 32, $data_system.words.sp)
self.contents.draw_text(x - 1, y - 1, 32, 32, $data_system.words.sp)
self.contents.draw_text(x - 1, y + 1, 32, 32, $data_system.words.sp)
self.contents.font.color = Color.new(74, 230, 51, 225)
self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
# MaxMP を描画するスペースがあるか計算
if width - 32 >= 108
sp_x = x + width - 108
flag = true
elsif width - 32 >= 48
sp_x = x + width - 48
flag = false
end
# MP を描画
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.contents.font.color = outline_color
self.contents.draw_text(sp_x - 1, y - 1, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x - 1, y + 1, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x + 1, y - 1, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x + 1, y + 1, 48, 32, actor.sp.to_s, 2)
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
# MaxMP を描画
if flag
self.contents.font.color = outline_color
self.contents.draw_text(sp_x + 60 - 1, y - 1, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 60 - 1, y + 1, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 60 + 1, y + 1, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 60 + 1, y - 1, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 48 - 1, y - 1, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 48 - 1, y - 1, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 48 + 1, y + 1, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 48 + 1, y + 1, 12, 32, "/", 1)
self.contents.font.color = normal_color
self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
end
end
#=========================================
def draw_actor_state2(actor, x, y, width = 120)
self.contents.font.name = $fontface
text = make_battler_state_text(actor, width, true)
self.contents.font.color = outline_color
self.contents.draw_text(x - 1, y - 1, width, 32, text)
self.contents.draw_text(x - 1, y + 1, width, 32, text)
self.contents.draw_text(x + 1, y + 1, width, 32, text)
self.contents.draw_text(x + 1, y - 1, width, 32, text)
self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
self.contents.draw_text(x, y, width, 32, text)
end
#=====================================
def draw_actor_parameter2(actor, x, y, type)
case type
when 0
parameter_name = $data_system.words.atk
parameter_value = actor.atk
when 1
parameter_name = $data_system.words.pdef
parameter_value = actor.pdef
when 2
parameter_name = "Geist"
parameter_value = actor.mdef
when 3
parameter_name = $data_system.words.str
parameter_value = actor.str
when 4
parameter_name = $data_system.words.dex
parameter_value = actor.dex
when 5
parameter_name = $data_system.words.agi
parameter_value = actor.agi
when 6
parameter_name = $data_system.words.int
parameter_value = actor.int
end
self.contents.font.color = system_color
self.contents.draw_text_outline(x, y, 120, 32, parameter_name)
self.contents.font.color = normal_color
self.contents.draw_text_outline(x + 130, y, 36, 32, parameter_value.to_s, 2)
end
#=========================================
def draw_item_name2(item, x, y)
if item == nil
self.contents.draw_text_outline(x + 28, y, 212, 32, "-")
return
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.draw_text_outline(x + 28, y, 212, 32, item.name)
end
# New colour for outlining text - Black
def outline_color
return Color.new(0, 0, 0, 255)
end
end
#==============================================================================
# ■ Window_Selectable
#------------------------------------------------------------------------------
#  カーソルの移動やスクロールの機能を持つウィンドウクラスです。
#==============================================================================
class Window_Itemselectable < Window_Base
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :index # カーソル位置
attr_reader :help_window # ヘルプウィンドウ
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# x : ウィンドウの X 座標
# y : ウィンドウの Y 座標
# width : ウィンドウの幅
# height : ウィンドウの高さ
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super(x, y, width, height)
@item_max = 1
@column_max = 1
@index = -1
end
#--------------------------------------------------------------------------
# ● カーソル位置の設定
# index : 新しいカーソル位置
#--------------------------------------------------------------------------
def index=(index)
@index = index
# ヘルプテキストを更新 (update_help は継承先で定義される
if self.active and @help_window != nil
update_help
end
# カーソルの矩形を更新
update_cursor_rect
end
#--------------------------------------------------------------------------
# ● 行数の取得
#--------------------------------------------------------------------------
def row_max
# 項目数と列数から行数を算出
return (@item_max + @column_max - 1) / @column_max
end
#--------------------------------------------------------------------------
# ● 先頭の行の取得
#--------------------------------------------------------------------------
def top_row
# ウィンドウ内容の転送元 Y 座標を、1 行の高さ 32 で割る
return self.oy / 32
end
#--------------------------------------------------------------------------
# ● 先頭の行の設定
# row : 先頭に表示する行
#--------------------------------------------------------------------------
def top_row=(row)
# row が 0 未満の場合は 0 に修正
if row < 0
row = 0
end
# row が row_max - 1 超の場合は row_max - 1 に修正
if row > row_max - 1
row = row_max - 1
end
# row に 1 行の高さ 32 を掛け、ウィンドウ内容の転送元 Y 座標とする
self.oy = row * 32
end
#--------------------------------------------------------------------------
# ● 1 ページに表示できる行数の取得
#--------------------------------------------------------------------------
def page_row_max
# ウィンドウの高さから、フレームの高さ 32 を引き、1 行の高さ 32 で割る
return (self.height - 32) / 32
end
#--------------------------------------------------------------------------
# ● 1 ページに表示できる項目数の取得
#--------------------------------------------------------------------------
def page_item_max
# 行数 page_row_max に 列数 @column_max を掛ける
return page_row_max * @column_max
end
#--------------------------------------------------------------------------
# ● ヘルプウィンドウの設定
# help_window : 新しいヘルプウィンドウ
#--------------------------------------------------------------------------
def help_window=(help_window)
@help_window = help_window
# ヘルプテキストを更新 (update_help は継承先で定義される
if self.active and @help_window != nil
update_help
end
end
#--------------------------------------------------------------------------
# ● カーソルの矩形更新
#--------------------------------------------------------------------------
def update_cursor_rect
# カーソル位置が 0 未満の場合
if @index < 0
self.cursor_rect.empty
return
end
# 現在の行を取得
row = @index / @column_max
# 現在の行が、表示されている先頭の行より前の場合
if row < self.top_row
# 現在の行が先頭になるようにスクロール
self.top_row = row
end
# 現在の行が、表示されている最後尾の行より後ろの場合
if row > self.top_row + (self.page_row_max - 1)
# 現在の行が最後尾になるようにスクロール
self.top_row = row - (self.page_row_max - 1)
end
# カーソルの幅を計算
cursor_width = self.width / @column_max - 32
# カーソルの座標を計算
x = @index % @column_max * (cursor_width + 6) + 10
y = @index / @column_max * 32 - self.oy
# カーソルの矩形を更新
self.cursor_rect.set(x, y, cursor_width, 32)
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
# カーソルの移動が可能な状態の場合
if self.active and @item_max > 0 and @index >= 0
# 方向ボタンの下が押された場合
if Input.repeat?(Input:
OWN)
# 列数が 1 かつ 方向ボタンの下の押下状態がリピートでない場合か、
# またはカーソル位置が
項目数 - 列数
より前の場合
if (@column_max == 1 and Input.trigger?(Input:
OWN)) or
@index < @item_max - @column_max
# カーソルを下に移動
$game_system.se_play($data_system.cursor_se)
@index = (@index + @column_max) % @item_max
end
end
# 方向ボタンの上が押された場合
if Input.repeat?(Input::UP)
# 列数が 1 かつ 方向ボタンの上の押下状態がリピートでない場合か、
# またはカーソル位置が列数より後ろの場合
if (@column_max == 1 and Input.trigger?(Input::UP)) or
@index >= @column_max
# カーソルを上に移動
$game_system.se_play($data_system.cursor_se)
@index = (@index - @column_max + @item_max) % @item_max
end
end
# 方向ボタンの右が押された場合
if Input.repeat?(Input::RIGHT)
# 列数が 2 以上で、カーソル位置が
項目数 - 1)より前の場合
if @column_max >= 2 and @index < @item_max - 1
# カーソルを右に移動
$game_system.se_play($data_system.cursor_se)
@index += 1
end
end
# 方向ボタンの左が押された場合
if Input.repeat?(Input::LEFT)
# 列数が 2 以上で、カーソル位置が 0 より後ろの場合
if @column_max >= 2 and @index > 0
# カーソルを左に移動
$game_system.se_play($data_system.cursor_se)
@index -= 1
end
end
# R ボタンが押された場合
if Input.repeat?(Input::R)
# 表示されている最後尾の行が、データ上の最後の行よりも前の場合
if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
# カーソルを 1 ページ後ろに移動
$game_system.se_play($data_system.cursor_se)
@index = [@index + self.page_item_max, @item_max - 1].min
self.top_row += self.page_row_max
end
end
# L ボタンが押された場合
if Input.repeat?(Input::L)
# 表示されている先頭の行が 0 より後ろの場合
if self.top_row > 0
# カーソルを 1 ページ前に移動
$game_system.se_play($data_system.cursor_se)
@index = [@index - self.page_item_max, 0].max
self.top_row -= self.page_row_max
end
end
end
# ヘルプテキストを更新 (update_help は継承先で定義される
if self.active and @help_window != nil
update_help
end
# カーソルの矩形を更新
update_cursor_rect
end
end
#==============================================================================
# ■ Window_Menuselectable
#------------------------------------------------------------------------------
#  カーソルの移動やスクロールの機能を持つウィンドウクラスです。
#==============================================================================
class Window_Menuselectable < Window_Base
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :index # カーソル位置
attr_reader :help_window # ヘルプウィンドウ
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# x : ウィンドウの X 座標
# y : ウィンドウの Y 座標
# width : ウィンドウの幅
# height : ウィンドウの高さ
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super(x, y, width, height)
@item_max = 1
@column_max = 1
@index = -1
end
#--------------------------------------------------------------------------
# ● カーソル位置の設定
# index : 新しいカーソル位置
#--------------------------------------------------------------------------
def index=(index)
@index = index
# ヘルプテキストを更新 (update_help は継承先で定義される
if self.active and @help_window != nil
update_help
end
# カーソルの矩形を更新
update_cursor_rect
end
#--------------------------------------------------------------------------
# ● 行数の取得
#--------------------------------------------------------------------------
def row_max
# 項目数と列数から行数を算出
return (@item_max + @column_max - 1) / @column_max
end
#--------------------------------------------------------------------------
# ● 先頭の行の取得
#--------------------------------------------------------------------------
def top_row
# ウィンドウ内容の転送元 Y 座標を、1 行の高さ 32 で割る
return self.oy / 32
end
#--------------------------------------------------------------------------
# ● 先頭の行の設定
# row : 先頭に表示する行
#--------------------------------------------------------------------------
def top_row=(row)
# row が 0 未満の場合は 0 に修正
if row < 0
row = 0
end
# row が row_max - 1 超の場合は row_max - 1 に修正
if row > row_max - 1
row = row_max - 1
end
# row に 1 行の高さ 32 を掛け、ウィンドウ内容の転送元 Y 座標とする
self.oy = row * 32
end
#--------------------------------------------------------------------------
# ● 1 ページに表示できる行数の取得
#--------------------------------------------------------------------------
def page_row_max
# ウィンドウの高さから、フレームの高さ 32 を引き、1 行の高さ 32 で割る
return (self.height - 32) / 32
end
#--------------------------------------------------------------------------
# ● 1 ページに表示できる項目数の取得
#--------------------------------------------------------------------------
def page_item_max
# 行数 page_row_max に 列数 @column_max を掛ける
return page_row_max * @column_max
end
#--------------------------------------------------------------------------
# ● ヘルプウィンドウの設定
# help_window : 新しいヘルプウィンドウ
#--------------------------------------------------------------------------
def help_window=(help_window)
@help_window = help_window
# ヘルプテキストを更新 (update_help は継承先で定義される
if self.active and @help_window != nil
update_help
end
end
#--------------------------------------------------------------------------
# ● カーソルの矩形更新
#--------------------------------------------------------------------------
def update_cursor_rect
# カーソル位置が 0 未満の場合
if @index < 0
self.cursor_rect.empty
return
end
# 現在の行を取得
row = @index / @column_max
# 現在の行が、表示されている先頭の行より前の場合
if row < self.top_row
# 現在の行が先頭になるようにスクロール
self.top_row = row
end
# 現在の行が、表示されている最後尾の行より後ろの場合
if row > self.top_row + (self.page_row_max - 1)
# 現在の行が最後尾になるようにスクロール
self.top_row = row - (self.page_row_max - 1)
end
# カーソルの幅を計算
cursor_width = self.width / @column_max - 32
# カーソルの座標を計算
x = @index % @column_max * (cursor_width + 32)
y = @index / @column_max * 40 - self.oy
# カーソルの矩形を更
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
# カーソルの移動が可能な状態の場合
if self.active and @item_max > 0 and @index >= 0
# 方向ボタンの下が押された場合
if Input.repeat?(Input:
OWN)
# 列数が 1 かつ 方向ボタンの下の押下状態がリピートでない場合か、
# またはカーソル位置が
項目数 - 列数
より前の場合
if (@column_max == 1 and Input.trigger?(Input:
OWN)) or
@index < @item_max - @column_max
# カーソルを下に移動
$game_system.se_play($data_system.cursor_se)
@index = (@index + @column_max) % @item_max
end
end
# 方向ボタンの上が押された場合
if Input.repeat?(Input::UP)
# 列数が 1 かつ 方向ボタンの上の押下状態がリピートでない場合か、
# またはカーソル位置が列数より後ろの場合
if (@column_max == 1 and Input.trigger?(Input::UP)) or
@index >= @column_max
# カーソルを上に移動
$game_system.se_play($data_system.cursor_se)
@index = (@index - @column_max + @item_max) % @item_max
end
end
# 方向ボタンの右が押された場合
if Input.repeat?(Input::RIGHT)
# 列数が 2 以上で、カーソル位置が
項目数 - 1)より前の場合
if @column_max >= 2 and @index < @item_max - 1
# カーソルを右に移動
$game_system.se_play($data_system.cursor_se)
@index += 1
end
end
# 方向ボタンの左が押された場合
if Input.repeat?(Input::LEFT)
# 列数が 2 以上で、カーソル位置が 0 より後ろの場合
if @column_max >= 2 and @index > 0
# カーソルを左に移動
$game_system.se_play($data_system.cursor_se)
@index -= 1
end
end
# R ボタンが押された場合
if Input.repeat?(Input::R)
# 表示されている最後尾の行が、データ上の最後の行よりも前の場合
if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
# カーソルを 1 ページ後ろに移動
$game_system.se_play($data_system.cursor_se)
@index = [@index + self.page_item_max, @item_max - 1].min
self.top_row += self.page_row_max
end
end
# L ボタンが押された場合
if Input.repeat?(Input::L)
# 表示されている先頭の行が 0 より後ろの場合
if self.top_row > 0
# カーソルを 1 ページ前に移動
$game_system.se_play($data_system.cursor_se)
@index = [@index - self.page_item_max, 0].max
self.top_row -= self.page_row_max
end
end
end
# ヘルプテキストを更新 (update_help は継承先で定義される
if self.active and @help_window != nil
update_help
end
# カーソルの矩形を更新
update_cursor_rect
end
end
#==============================================================================
# ■ Window_Menucommand
#------------------------------------------------------------------------------
#  一般的なコマンド選択を行うウィンドウです。
#==============================================================================
class Window_Menucommand < Window_Menuselectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# width : ウィンドウの幅
# commands : コマンド文字列の配列
#--------------------------------------------------------------------------
def initialize(width, commands)
# コマンドの個数からウィンドウの高さを算出
super(0, 0, width, commands.size * 32 + 32)
@item_max = commands.size
@commands = commands
self.contents = Bitmap.new(width - 32, @item_max * 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i, normal_color)
end
end
#--------------------------------------------------------------------------
# ● 項目の描画
# index : 項目番号
# color : 文字色
#--------------------------------------------------------------------------
def draw_item(index, color)
self.contents.font.color = color
rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index])
end
#--------------------------------------------------------------------------
# ● 項目の無効化
# index : 項目番号
#--------------------------------------------------------------------------
def disable_item(index)
draw_item(index, disabled_color)
end
end
#==============================================================================
# ■ Window_Help
#------------------------------------------------------------------------------
#  スキルやアイテムの説明、アクターのステータスなどを表示するウィンドウです。
#==============================================================================
class Window_Menuhelp < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, - 77, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = 18
self.opacity = 0
end
#--------------------------------------------------------------------------
# ● テキスト設定
# text : ウィンドウに表示する文字列
# align : アラインメント (0..左揃え、1..中央揃え、2..右揃え
#--------------------------------------------------------------------------
def set_text(text, align = 0)
# テキストとアラインメントの少なくとも一方が前回と違っている場合
if text != @text or align != @align
# テキストを再描画
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
@text = text
@align = align
@actor = nil
end
self.visible = true
end
#--------------------------------------------------------------------------
# ● アクター設定
# actor : ステータスを表示するアクター
#--------------------------------------------------------------------------
def set_actor(actor)
if actor != @actor
self.contents.clear
draw_actor_name(actor, 4, 0)
draw_actor_state(actor, 140, 0)
draw_actor_hp(actor, 284, 0)
draw_actor_sp(actor, 460, 0)
@actor = actor
@text = nil
self.visible = true
end
end
#--------------------------------------------------------------------------
# ● エネミー設定
# enemy : 名前とステートを表示するエネミー
#--------------------------------------------------------------------------
def set_enemy(enemy)
text = enemy.name
state_text = make_battler_state_text(enemy, 112, false)
if state_text != ""
text += "(" + state_text + ")"
end
set_text(text, 1)
end
end
#==============================================================================
# ■ Window_Gold
#------------------------------------------------------------------------------
#  ゴールドを表示するウィンドウです。
#==============================================================================
class Window_Gold < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 0, 200, 64)
self.contents = Bitmap.new(width - 35, height - 35)
self.contents.font.name = $fontface
self.contents.font.size = 21
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
cx = contents.text_size("Gil").width
self.contents.font.color = outline_color
self.contents.draw_text(81, - 1, 100-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.draw_text(81, 1, 100-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.draw_text(79, 1, 100-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.draw_text(79, - 1, 100-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = normal_color
self.contents.draw_text(80, 0, 100-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = outline_color
self.contents.draw_text(- 1, - 1, cx, 32, "Gil", 2)
self.contents.draw_text(1, 1, cx, 32, "Gil", 2)
self.contents.draw_text(- 1, 1, cx, 32, "Gil", 2)
self.contents.draw_text(1, - 1, cx, 32, "Gil", 2)
self.contents.font.color = Color.new(254, 230, 159, 255)
self.contents.draw_text(0, 0, cx, 32, "Gil", 2)
end
end
#==============================================================================
# ■ Window_PlayTime
#------------------------------------------------------------------------------
#  メニュー画面でプレイ時間を表示するウィンドウです。
#==============================================================================
class Window_PlayTime < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 0, 200, 70)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = 21
self.opacity = 0
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = outline_color
self.contents.draw_text(1, - 1, 120, 32, "Spielzeit:")
self.contents.draw_text(1, 1, 120, 32, "Spielzeit:")
self.contents.draw_text(-1, - 1, 120, 32, "Spielzeit:")
self.contents.draw_text(-1, 1, 120, 32, "Spielzeit:")
self.contents.font.color = Color.new(254, 230, 159, 255)
self.contents.draw_text(0, 0, 120, 32, "Spielzeit:")
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = outline_color
self.contents.draw_text(39, - 1, 120, 32, text, 2)
self.contents.draw_text(39, 1, 120, 32, text, 2)
self.contents.draw_text(41, 1, 120, 32, text, 2)
self.contents.draw_text(41, -1, 120, 32, text, 2)
self.contents.font.color = normal_color
self.contents.draw_text(40, 0, 120, 32, text, 2)
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
#  メニュー画面でパーティメンバーのステータスを表示するウィンドウです。
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 0, 480, 430)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 100 - i * 18
y = i * 100
actor = $game_party.actors
draw_actor_face(actor, x - 40, y + 80)
draw_actor_name2(actor, x + 50, y)
draw_actor_class2(actor, x + 50, y + 50)
draw_actor_level2(actor, x + 50, y + 25)
draw_actor_state2(actor, x + 155, y + 50)
draw_actor_hp2(actor, x + 140, y )
draw_actor_sp2(actor, x + 140, y + 25)
draw_actor_barz(actor, x + 140, y + 25, "horizontal", 130, 1, actor.hp, actor.maxhp, Color.new(254, 238, 189, 255), Color.new(182, 137, 2, 255))
draw_actor_barz(actor, x + 140, y + 50, "horizontal", 130, 1, actor.sp, actor.maxsp, Color.new(74, 230, 51, 225), Color.new(35, 150, 19, 225))
end
end
#--------------------------------------------------------------------------
# ● カーソルの矩形更新
#--------------------------------------------------------------------------
def update_cursor_rect
self.cursor_rect.empty
end
end
#==============================================================================
# ■ Window_Item
#------------------------------------------------------------------------------
#  アイテム画面、バトル画面で、所持アイテムの一覧を表示するウィンドウです。
#==============================================================================
class Window_Menuitem < Window_Itemselectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 500, 640, 380)
@column_max = 2
refresh
self.index = 0
self.opacity = 0
# 戦闘中の場合はウィンドウを画面中央へ移動し、半透明にする
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#--------------------------------------------------------------------------
# ● アイテムの取得
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# アイテムを追加
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items[i])
end
end
# 戦闘中以外なら武器と防具も追加
unless $game_temp.in_battle
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
@data.push($data_weapons[i])
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
@data.push($data_armors[i])
end
end
end
# 項目数が 0 でなければビットマップを作成し、全項目を描画
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# ● 項目の描画
# index : 項目番号
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.font.color = normal_color
else
self.contents.font.color = Color.new(255, 255, 255, 200)
end
x = 4 + index % 2 * (270 + 25) + 12
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.draw_text_outline(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text_outline(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text_outline(x + 256, y, 24, 32, number.to_s, 2)
else
self.contents.draw_text_outline2(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text_outline2(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text_outline2(x + 256, y, 24, 32, number.to_s, 2)
end
end
#--------------------------------------------------------------------------
# ● ヘルプテキスト更新
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
#==============================================================================
# ■ Window_Menuskill
#------------------------------------------------------------------------------
#
#==============================================================================
class Window_Menuskill < Window_Itemselectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor : アクター
#--------------------------------------------------------------------------
def initialize(actor)
super(- 3, 531, 640, 352)
@actor = actor
@column_max = 2
refresh
self.index = 0
# 戦闘中の場合はウィンドウを画面中央へ移動し、半透明にする
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#--------------------------------------------------------------------------
# ● スキルの取得
#--------------------------------------------------------------------------
def skill
return @data[self.index]
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 0...@actor.skills.size
skill = $data_skills[@actor.skills[i]]
if skill != nil
@data.push(skill)
end
end
# 項目数が 0 でなければビットマップを作成し、全項目を描画
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# ● 項目の描画
# index : 項目番号
#--------------------------------------------------------------------------
def draw_item(index)
skill = @data[index]
if @actor.skill_can_use?(skill.id)
self.contents.font.color = normal_color
else
self.contents.font.color = Color.new(255, 255, 255, 200)
end
x = 4 + index % 2 * (270 + 25) + 12
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(skill.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
if @actor.skill_can_use?(skill.id)
self.contents.draw_text_outline(x + 28, y, 204, 32, skill.name, 0)
self.contents.draw_text_outline(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
else
self.contents.draw_text_outline2(x + 28, y, 204, 32, skill.name, 0)
self.contents.draw_text_outline2(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
end
end
#--------------------------------------------------------------------------
# ● ヘルプテキスト更新
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.skill == nil ? "" : self.skill.description)
end
end
#==============================================================================
# ■ Window_SkillStatus
#------------------------------------------------------------------------------
#  スキル画面で、スキル使用者のステータスを表示するウィ&
Kannst du das? xD
Oder ein anderer? ^^
Hier nochmal das Skript vom FF-Menü (umgearbeitet xD)
#=========================================================
#Costum Menü, umgearbeitet von XplayerX
#=========================================================
class Bitmap
def draw_text_shadow_rect(rect, text, align = 0)
self.font.size -= 2
old_col = self.font.color.clone
# Dark shadow
self.font.color = Color.new(0,0,0, 255)
draw_text(Rect.new(rect.x+1, rect.y+1, rect.width,
rect.height), text, align)
# Small outline
self.font.color = Color.new(96,96,96,96)
draw_text(Rect.new(rect.x+1, rect.y, rect.width,
rect.height), text, align)
draw_text(Rect.new(rect.x-1, rect.y, rect.width,
rect.height), text, align)
draw_text(Rect.new(rect.x, rect.y-1, rect.width,
rect.height), text, align)
draw_text(Rect.new(rect.x, rect.y+1, rect.width,
rect.height), text, align)
# Normal text
self.font.color = old_col
draw_text(rect, text, align)
self.font.size += 2
end
def draw_text_shadow(x, y, wid, hei, text, align = 0)
self.font.size -= 2
old_col = self.font.color.clone
# Dark shadow
self.font.color = Color.new(0,0,0, 255)
draw_text(x+1,y+1,wid,hei,text, align)
# Small outline
self.font.color = Color.new(96,96,96,96)
draw_text(x+1,y,wid,hei,text, align)
draw_text(x+2,y,wid,hei,text, align)
draw_text(x+2,y,wid,hei,text, align)
draw_text(x,y-1,wid,hei,text, align)
draw_text(x,y+1,wid,hei,text, align)
draw_text(x,y+2,wid,hei,text, align)
# Normal
self.font.color = old_col
draw_text(x,y,wid,hei,text, align)
self.font.size += 2
end
def draw_text_outline(x, y, wid, hei, text, align = 0)
self.font.color = Color.new(0, 0, 0, 255)
draw_text(x + 1,y + 1,wid,hei,text, align)
draw_text(x + 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y + 1,wid,hei,text, align)
self.font.color = Color.new(255, 255, 255, 255)
draw_text(x,y,wid,hei,text, align)
end
def draw_text_outline2(x, y, wid, hei, text, align = 0)
self.font.color = Color.new(0, 0, 0, 255)
draw_text(x + 1,y + 1,wid,hei,text, align)
draw_text(x + 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y + 1,wid,hei,text, align)
self.font.color = Color.new(255, 255, 255, 200)
draw_text(x,y,wid,hei,text, align)
end
def draw_text_outline3(x, y, wid, hei, text, align = 0)
self.font.color = Color.new(0, 0, 0, 255)
draw_text(x + 1,y + 1,wid,hei,text, align)
draw_text(x + 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y + 1,wid,hei,text, align)
self.font.color = Color.new(192, 224, 255, 255)
draw_text(x,y,wid,hei,text, align)
end
def draw_text_outline4(x, y, wid, hei, text, align = 0)
self.font.color = Color.new(0, 0, 0, 190)
draw_text(x + 1,y + 1,wid,hei,text, align)
draw_text(x + 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y - 1,wid,hei,text, align)
draw_text(x - 1,y + 1,wid,hei,text, align)
self.font.color = Color.new(255, 255, 255, 255)
draw_text(x,y,wid,hei,text, align)
end
end
class Window_Base < Window
#=====================================
# Gradient Bars , thanks to Acedent Prone
def draw_normal_barz(x, y, type, length, thick, e1, e2, c1 = Color.new(255,0,0,255), c2 = Color.new(0,0,0,255))
if type == "horizontal"
width = length
height = thick
self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
w = width * e1 / e2
for i in 0..height
r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
end
elsif type == "vertical"
width = thick
height = length
self.contents.fill_rect(x-1, y - 1, width+3, height + 2, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255))
h = height * e1 / e2
for i in 0..width
r = c1.red + (c2.red - c1.red) * (width -i)/width + 0 * i/width
g = c1.green + (c2.green - c1.green) * (width -i)/width + 0 * i/width
b = c1.blue + (c2.blue - c1.blue) * (width -i)/width + 0 * i/width
a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width + 255 * i/width
self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a))
end
end
end
def draw_actor_barz(actor,x, y, type, length, thick, e1, e2, c1 = Color.new(255,0,0,255), c2 = Color.new(0,0,0,255))
if type == "horizontal"
width = length
height = thick
self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(0, 0, 0, 255))
self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
w = width * e1 / e2
for i in 0..height
r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
end
elsif type == "vertical"
width = thick
height = length
self.contents.fill_rect(x-1, y - 1, width+3, height + 2, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255))
h = height * e1 / e2
for i in 0..width
r = c1.red + (c2.red - c1.red) * (width -i)/width + 0 * i/width
g = c1.green + (c2.green - c1.green) * (width -i)/width + 0 * i/width
b = c1.blue + (c2.blue - c1.blue) * (width -i)/width + 0 * i/width
a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width + 255 * i/width
self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a))
end
end
end
#=====================================
# New definitions
def draw_battlegraphic(actor, x, y)
bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
#======================================
def draw_actor_statuswindow(actor, x, y)
bitmap = RPG::Cache.picture(actor.character_name, actor.character_hue)
cw = bitmap.width / 4
ch = bitmap.height / 4
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
end
#=====================================
def draw_actor_face(actor, x, y)
face = RPG::Cache.character("Faces/" + actor.character_name, actor.character_hue)
fw = face.width
fh = face.height
src_rect = Rect.new(0, 0, fw, fh)
self.contents.blt(x - fw / 23, y - fh, face, src_rect)
end
#=====================================
def draw_actor_name2(actor, x, y)
self.contents.font.name = $fontface
self.contents.font.color = outline_color
self.contents.draw_text(x - 1, y - 1, 120, 32, actor.name)
self.contents.draw_text(x + 1, y - 1, 120, 32, actor.name)
self.contents.draw_text(x + 1, y + 1, 120, 32, actor.name)
self.contents.draw_text(x - 1, y + 1, 120, 32, actor.name)
self.contents.font.color = normal_color
self.contents.draw_text(x, y, 120, 32, actor.name)
end
#=====================================
def draw_actor_level2(actor, x, y)
self.contents.font.name = $fontface
self.contents.font.color = outline_color
self.contents.draw_text(x - 1, y - 1, 32, 32, "Lvl.")
self.contents.draw_text(x - 1, y + 1, 32, 32, "Lvl.")
self.contents.draw_text(x + 1, y - 1, 32, 32, "Lvl.")
self.contents.draw_text(x + 1, y + 1, 32, 32, "Lvl.")
self.contents.font.color = Color.new(254, 230, 159, 255)
self.contents.draw_text(x, y, 32, 32, "Lvl.")
self.contents.font.color = outline_color
self.contents.draw_text(x + 31, y + 1, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(x + 31, y - 1, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(x + 33, y + 1, 24, 32, actor.level.to_s, 2)
self.contents.draw_text(x + 33, y - 1, 24, 32, actor.level.to_s, 2)
self.contents.font.color = normal_color
self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
end
#=====================================
def draw_actor_class2(actor, x, y)
self.contents.font.name = "Monotype Corsiva"
self.contents.font.color = outline_color
self.contents.draw_text(x + 1, y + 1, 100, 32, actor.class_name)
self.contents.draw_text(x + 1, y - 1, 100, 32, actor.class_name)
self.contents.draw_text(x - 1, y + 1, 100, 32, actor.class_name)
self.contents.draw_text(x - 1, y - 1, 100, 32, actor.class_name)
self.contents.font.color = Color.new(238, 139, 254, 255)
self.contents.draw_text(x, y, 100, 32, actor.class_name)
end
#======================================
def draw_actor_hp2(actor, x, y, width = 144)
self.contents.font.name = "Tahoma"
# 文字列 "HP" を描画
self.contents.font.size = 24
self.contents.font.color = outline_color
self.contents.draw_text(x + 1, y + 1, 32, 32, $data_system.words.hp)
self.contents.draw_text(x + 1, y - 1, 32, 32, $data_system.words.hp)
self.contents.draw_text(x - 1, y - 1, 32, 32, $data_system.words.hp)
self.contents.draw_text(x - 1, y + 1, 32, 32, $data_system.words.hp)
self.contents.font.color = Color.new(254, 238, 189, 255)
self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
# MaxHP を描画するスペースがあるか計算
if width - 32 >= 108
hp_x = x + width - 108
flag = true
elsif width - 32 >= 48
hp_x = x + width - 48
flag = false
end
# HP を描画
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.contents.font.color = outline_color
self.contents.draw_text(hp_x - 1, y - 1, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x - 1, y + 1, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x + 1, y + 1, 48, 32, actor.hp.to_s, 2)
self.contents.draw_text(hp_x + 1, y - 1, 48, 32, actor.hp.to_s, 2)
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
# MaxHP を描画
if flag
self.contents.font.color = outline_color
self.contents.draw_text(hp_x + 60 - 1, y - 1, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 60 - 1, y + 1, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 60 + 1, y - 1, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 60 + 1, y + 1, 48, 32, actor.maxhp.to_s)
self.contents.draw_text(hp_x + 48 - 1, y - 1, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 48 + 1, y + 1, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 48 - 1, y + 1, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 48 + 1, y - 1, 12, 32, "/", 1)
self.contents.font.color = normal_color
self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
end
end
#============================================
def draw_actor_sp2(actor, x, y, width = 144)
self.contents.font.name = "Tahoma"
# 文字列 "MP" を描画
self.contents.font.size = 24
self.contents.font.color = outline_color
self.contents.draw_text(x + 1, y + 1, 32, 32, $data_system.words.sp)
self.contents.draw_text(x + 1, y - 1, 32, 32, $data_system.words.sp)
self.contents.draw_text(x - 1, y - 1, 32, 32, $data_system.words.sp)
self.contents.draw_text(x - 1, y + 1, 32, 32, $data_system.words.sp)
self.contents.font.color = Color.new(74, 230, 51, 225)
self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
# MaxMP を描画するスペースがあるか計算
if width - 32 >= 108
sp_x = x + width - 108
flag = true
elsif width - 32 >= 48
sp_x = x + width - 48
flag = false
end
# MP を描画
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
self.contents.font.color = outline_color
self.contents.draw_text(sp_x - 1, y - 1, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x - 1, y + 1, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x + 1, y - 1, 48, 32, actor.sp.to_s, 2)
self.contents.draw_text(sp_x + 1, y + 1, 48, 32, actor.sp.to_s, 2)
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
# MaxMP を描画
if flag
self.contents.font.color = outline_color
self.contents.draw_text(sp_x + 60 - 1, y - 1, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 60 - 1, y + 1, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 60 + 1, y + 1, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 60 + 1, y - 1, 48, 32, actor.maxsp.to_s)
self.contents.draw_text(sp_x + 48 - 1, y - 1, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 48 - 1, y - 1, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 48 + 1, y + 1, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 48 + 1, y + 1, 12, 32, "/", 1)
self.contents.font.color = normal_color
self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
end
end
#=========================================
def draw_actor_state2(actor, x, y, width = 120)
self.contents.font.name = $fontface
text = make_battler_state_text(actor, width, true)
self.contents.font.color = outline_color
self.contents.draw_text(x - 1, y - 1, width, 32, text)
self.contents.draw_text(x - 1, y + 1, width, 32, text)
self.contents.draw_text(x + 1, y + 1, width, 32, text)
self.contents.draw_text(x + 1, y - 1, width, 32, text)
self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
self.contents.draw_text(x, y, width, 32, text)
end
#=====================================
def draw_actor_parameter2(actor, x, y, type)
case type
when 0
parameter_name = $data_system.words.atk
parameter_value = actor.atk
when 1
parameter_name = $data_system.words.pdef
parameter_value = actor.pdef
when 2
parameter_name = "Geist"
parameter_value = actor.mdef
when 3
parameter_name = $data_system.words.str
parameter_value = actor.str
when 4
parameter_name = $data_system.words.dex
parameter_value = actor.dex
when 5
parameter_name = $data_system.words.agi
parameter_value = actor.agi
when 6
parameter_name = $data_system.words.int
parameter_value = actor.int
end
self.contents.font.color = system_color
self.contents.draw_text_outline(x, y, 120, 32, parameter_name)
self.contents.font.color = normal_color
self.contents.draw_text_outline(x + 130, y, 36, 32, parameter_value.to_s, 2)
end
#=========================================
def draw_item_name2(item, x, y)
if item == nil
self.contents.draw_text_outline(x + 28, y, 212, 32, "-")
return
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
self.contents.draw_text_outline(x + 28, y, 212, 32, item.name)
end
# New colour for outlining text - Black
def outline_color
return Color.new(0, 0, 0, 255)
end
end
#==============================================================================
# ■ Window_Selectable
#------------------------------------------------------------------------------
#  カーソルの移動やスクロールの機能を持つウィンドウクラスです。
#==============================================================================
class Window_Itemselectable < Window_Base
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :index # カーソル位置
attr_reader :help_window # ヘルプウィンドウ
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# x : ウィンドウの X 座標
# y : ウィンドウの Y 座標
# width : ウィンドウの幅
# height : ウィンドウの高さ
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super(x, y, width, height)
@item_max = 1
@column_max = 1
@index = -1
end
#--------------------------------------------------------------------------
# ● カーソル位置の設定
# index : 新しいカーソル位置
#--------------------------------------------------------------------------
def index=(index)
@index = index
# ヘルプテキストを更新 (update_help は継承先で定義される

if self.active and @help_window != nil
update_help
end
# カーソルの矩形を更新
update_cursor_rect
end
#--------------------------------------------------------------------------
# ● 行数の取得
#--------------------------------------------------------------------------
def row_max
# 項目数と列数から行数を算出
return (@item_max + @column_max - 1) / @column_max
end
#--------------------------------------------------------------------------
# ● 先頭の行の取得
#--------------------------------------------------------------------------
def top_row
# ウィンドウ内容の転送元 Y 座標を、1 行の高さ 32 で割る
return self.oy / 32
end
#--------------------------------------------------------------------------
# ● 先頭の行の設定
# row : 先頭に表示する行
#--------------------------------------------------------------------------
def top_row=(row)
# row が 0 未満の場合は 0 に修正
if row < 0
row = 0
end
# row が row_max - 1 超の場合は row_max - 1 に修正
if row > row_max - 1
row = row_max - 1
end
# row に 1 行の高さ 32 を掛け、ウィンドウ内容の転送元 Y 座標とする
self.oy = row * 32
end
#--------------------------------------------------------------------------
# ● 1 ページに表示できる行数の取得
#--------------------------------------------------------------------------
def page_row_max
# ウィンドウの高さから、フレームの高さ 32 を引き、1 行の高さ 32 で割る
return (self.height - 32) / 32
end
#--------------------------------------------------------------------------
# ● 1 ページに表示できる項目数の取得
#--------------------------------------------------------------------------
def page_item_max
# 行数 page_row_max に 列数 @column_max を掛ける
return page_row_max * @column_max
end
#--------------------------------------------------------------------------
# ● ヘルプウィンドウの設定
# help_window : 新しいヘルプウィンドウ
#--------------------------------------------------------------------------
def help_window=(help_window)
@help_window = help_window
# ヘルプテキストを更新 (update_help は継承先で定義される

if self.active and @help_window != nil
update_help
end
end
#--------------------------------------------------------------------------
# ● カーソルの矩形更新
#--------------------------------------------------------------------------
def update_cursor_rect
# カーソル位置が 0 未満の場合
if @index < 0
self.cursor_rect.empty
return
end
# 現在の行を取得
row = @index / @column_max
# 現在の行が、表示されている先頭の行より前の場合
if row < self.top_row
# 現在の行が先頭になるようにスクロール
self.top_row = row
end
# 現在の行が、表示されている最後尾の行より後ろの場合
if row > self.top_row + (self.page_row_max - 1)
# 現在の行が最後尾になるようにスクロール
self.top_row = row - (self.page_row_max - 1)
end
# カーソルの幅を計算
cursor_width = self.width / @column_max - 32
# カーソルの座標を計算
x = @index % @column_max * (cursor_width + 6) + 10
y = @index / @column_max * 32 - self.oy
# カーソルの矩形を更新
self.cursor_rect.set(x, y, cursor_width, 32)
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
# カーソルの移動が可能な状態の場合
if self.active and @item_max > 0 and @index >= 0
# 方向ボタンの下が押された場合
if Input.repeat?(Input:
OWN)# 列数が 1 かつ 方向ボタンの下の押下状態がリピートでない場合か、
# またはカーソル位置が
項目数 - 列数
より前の場合if (@column_max == 1 and Input.trigger?(Input:
OWN)) or@index < @item_max - @column_max
# カーソルを下に移動
$game_system.se_play($data_system.cursor_se)
@index = (@index + @column_max) % @item_max
end
end
# 方向ボタンの上が押された場合
if Input.repeat?(Input::UP)
# 列数が 1 かつ 方向ボタンの上の押下状態がリピートでない場合か、
# またはカーソル位置が列数より後ろの場合
if (@column_max == 1 and Input.trigger?(Input::UP)) or
@index >= @column_max
# カーソルを上に移動
$game_system.se_play($data_system.cursor_se)
@index = (@index - @column_max + @item_max) % @item_max
end
end
# 方向ボタンの右が押された場合
if Input.repeat?(Input::RIGHT)
# 列数が 2 以上で、カーソル位置が
項目数 - 1)より前の場合if @column_max >= 2 and @index < @item_max - 1
# カーソルを右に移動
$game_system.se_play($data_system.cursor_se)
@index += 1
end
end
# 方向ボタンの左が押された場合
if Input.repeat?(Input::LEFT)
# 列数が 2 以上で、カーソル位置が 0 より後ろの場合
if @column_max >= 2 and @index > 0
# カーソルを左に移動
$game_system.se_play($data_system.cursor_se)
@index -= 1
end
end
# R ボタンが押された場合
if Input.repeat?(Input::R)
# 表示されている最後尾の行が、データ上の最後の行よりも前の場合
if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
# カーソルを 1 ページ後ろに移動
$game_system.se_play($data_system.cursor_se)
@index = [@index + self.page_item_max, @item_max - 1].min
self.top_row += self.page_row_max
end
end
# L ボタンが押された場合
if Input.repeat?(Input::L)
# 表示されている先頭の行が 0 より後ろの場合
if self.top_row > 0
# カーソルを 1 ページ前に移動
$game_system.se_play($data_system.cursor_se)
@index = [@index - self.page_item_max, 0].max
self.top_row -= self.page_row_max
end
end
end
# ヘルプテキストを更新 (update_help は継承先で定義される

if self.active and @help_window != nil
update_help
end
# カーソルの矩形を更新
update_cursor_rect
end
end
#==============================================================================
# ■ Window_Menuselectable
#------------------------------------------------------------------------------
#  カーソルの移動やスクロールの機能を持つウィンドウクラスです。
#==============================================================================
class Window_Menuselectable < Window_Base
#--------------------------------------------------------------------------
# ● 公開インスタンス変数
#--------------------------------------------------------------------------
attr_reader :index # カーソル位置
attr_reader :help_window # ヘルプウィンドウ
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# x : ウィンドウの X 座標
# y : ウィンドウの Y 座標
# width : ウィンドウの幅
# height : ウィンドウの高さ
#--------------------------------------------------------------------------
def initialize(x, y, width, height)
super(x, y, width, height)
@item_max = 1
@column_max = 1
@index = -1
end
#--------------------------------------------------------------------------
# ● カーソル位置の設定
# index : 新しいカーソル位置
#--------------------------------------------------------------------------
def index=(index)
@index = index
# ヘルプテキストを更新 (update_help は継承先で定義される

if self.active and @help_window != nil
update_help
end
# カーソルの矩形を更新
update_cursor_rect
end
#--------------------------------------------------------------------------
# ● 行数の取得
#--------------------------------------------------------------------------
def row_max
# 項目数と列数から行数を算出
return (@item_max + @column_max - 1) / @column_max
end
#--------------------------------------------------------------------------
# ● 先頭の行の取得
#--------------------------------------------------------------------------
def top_row
# ウィンドウ内容の転送元 Y 座標を、1 行の高さ 32 で割る
return self.oy / 32
end
#--------------------------------------------------------------------------
# ● 先頭の行の設定
# row : 先頭に表示する行
#--------------------------------------------------------------------------
def top_row=(row)
# row が 0 未満の場合は 0 に修正
if row < 0
row = 0
end
# row が row_max - 1 超の場合は row_max - 1 に修正
if row > row_max - 1
row = row_max - 1
end
# row に 1 行の高さ 32 を掛け、ウィンドウ内容の転送元 Y 座標とする
self.oy = row * 32
end
#--------------------------------------------------------------------------
# ● 1 ページに表示できる行数の取得
#--------------------------------------------------------------------------
def page_row_max
# ウィンドウの高さから、フレームの高さ 32 を引き、1 行の高さ 32 で割る
return (self.height - 32) / 32
end
#--------------------------------------------------------------------------
# ● 1 ページに表示できる項目数の取得
#--------------------------------------------------------------------------
def page_item_max
# 行数 page_row_max に 列数 @column_max を掛ける
return page_row_max * @column_max
end
#--------------------------------------------------------------------------
# ● ヘルプウィンドウの設定
# help_window : 新しいヘルプウィンドウ
#--------------------------------------------------------------------------
def help_window=(help_window)
@help_window = help_window
# ヘルプテキストを更新 (update_help は継承先で定義される

if self.active and @help_window != nil
update_help
end
end
#--------------------------------------------------------------------------
# ● カーソルの矩形更新
#--------------------------------------------------------------------------
def update_cursor_rect
# カーソル位置が 0 未満の場合
if @index < 0
self.cursor_rect.empty
return
end
# 現在の行を取得
row = @index / @column_max
# 現在の行が、表示されている先頭の行より前の場合
if row < self.top_row
# 現在の行が先頭になるようにスクロール
self.top_row = row
end
# 現在の行が、表示されている最後尾の行より後ろの場合
if row > self.top_row + (self.page_row_max - 1)
# 現在の行が最後尾になるようにスクロール
self.top_row = row - (self.page_row_max - 1)
end
# カーソルの幅を計算
cursor_width = self.width / @column_max - 32
# カーソルの座標を計算
x = @index % @column_max * (cursor_width + 32)
y = @index / @column_max * 40 - self.oy
# カーソルの矩形を更
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
# カーソルの移動が可能な状態の場合
if self.active and @item_max > 0 and @index >= 0
# 方向ボタンの下が押された場合
if Input.repeat?(Input:
OWN)# 列数が 1 かつ 方向ボタンの下の押下状態がリピートでない場合か、
# またはカーソル位置が
項目数 - 列数
より前の場合if (@column_max == 1 and Input.trigger?(Input:
OWN)) or@index < @item_max - @column_max
# カーソルを下に移動
$game_system.se_play($data_system.cursor_se)
@index = (@index + @column_max) % @item_max
end
end
# 方向ボタンの上が押された場合
if Input.repeat?(Input::UP)
# 列数が 1 かつ 方向ボタンの上の押下状態がリピートでない場合か、
# またはカーソル位置が列数より後ろの場合
if (@column_max == 1 and Input.trigger?(Input::UP)) or
@index >= @column_max
# カーソルを上に移動
$game_system.se_play($data_system.cursor_se)
@index = (@index - @column_max + @item_max) % @item_max
end
end
# 方向ボタンの右が押された場合
if Input.repeat?(Input::RIGHT)
# 列数が 2 以上で、カーソル位置が
項目数 - 1)より前の場合if @column_max >= 2 and @index < @item_max - 1
# カーソルを右に移動
$game_system.se_play($data_system.cursor_se)
@index += 1
end
end
# 方向ボタンの左が押された場合
if Input.repeat?(Input::LEFT)
# 列数が 2 以上で、カーソル位置が 0 より後ろの場合
if @column_max >= 2 and @index > 0
# カーソルを左に移動
$game_system.se_play($data_system.cursor_se)
@index -= 1
end
end
# R ボタンが押された場合
if Input.repeat?(Input::R)
# 表示されている最後尾の行が、データ上の最後の行よりも前の場合
if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
# カーソルを 1 ページ後ろに移動
$game_system.se_play($data_system.cursor_se)
@index = [@index + self.page_item_max, @item_max - 1].min
self.top_row += self.page_row_max
end
end
# L ボタンが押された場合
if Input.repeat?(Input::L)
# 表示されている先頭の行が 0 より後ろの場合
if self.top_row > 0
# カーソルを 1 ページ前に移動
$game_system.se_play($data_system.cursor_se)
@index = [@index - self.page_item_max, 0].max
self.top_row -= self.page_row_max
end
end
end
# ヘルプテキストを更新 (update_help は継承先で定義される

if self.active and @help_window != nil
update_help
end
# カーソルの矩形を更新
update_cursor_rect
end
end
#==============================================================================
# ■ Window_Menucommand
#------------------------------------------------------------------------------
#  一般的なコマンド選択を行うウィンドウです。
#==============================================================================
class Window_Menucommand < Window_Menuselectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# width : ウィンドウの幅
# commands : コマンド文字列の配列
#--------------------------------------------------------------------------
def initialize(width, commands)
# コマンドの個数からウィンドウの高さを算出
super(0, 0, width, commands.size * 32 + 32)
@item_max = commands.size
@commands = commands
self.contents = Bitmap.new(width - 32, @item_max * 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i, normal_color)
end
end
#--------------------------------------------------------------------------
# ● 項目の描画
# index : 項目番号
# color : 文字色
#--------------------------------------------------------------------------
def draw_item(index, color)
self.contents.font.color = color
rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index])
end
#--------------------------------------------------------------------------
# ● 項目の無効化
# index : 項目番号
#--------------------------------------------------------------------------
def disable_item(index)
draw_item(index, disabled_color)
end
end
#==============================================================================
# ■ Window_Help
#------------------------------------------------------------------------------
#  スキルやアイテムの説明、アクターのステータスなどを表示するウィンドウです。
#==============================================================================
class Window_Menuhelp < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, - 77, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = 18
self.opacity = 0
end
#--------------------------------------------------------------------------
# ● テキスト設定
# text : ウィンドウに表示する文字列
# align : アラインメント (0..左揃え、1..中央揃え、2..右揃え

#--------------------------------------------------------------------------
def set_text(text, align = 0)
# テキストとアラインメントの少なくとも一方が前回と違っている場合
if text != @text or align != @align
# テキストを再描画
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
@text = text
@align = align
@actor = nil
end
self.visible = true
end
#--------------------------------------------------------------------------
# ● アクター設定
# actor : ステータスを表示するアクター
#--------------------------------------------------------------------------
def set_actor(actor)
if actor != @actor
self.contents.clear
draw_actor_name(actor, 4, 0)
draw_actor_state(actor, 140, 0)
draw_actor_hp(actor, 284, 0)
draw_actor_sp(actor, 460, 0)
@actor = actor
@text = nil
self.visible = true
end
end
#--------------------------------------------------------------------------
# ● エネミー設定
# enemy : 名前とステートを表示するエネミー
#--------------------------------------------------------------------------
def set_enemy(enemy)
text = enemy.name
state_text = make_battler_state_text(enemy, 112, false)
if state_text != ""
text += "(" + state_text + ")"
end
set_text(text, 1)
end
end
#==============================================================================
# ■ Window_Gold
#------------------------------------------------------------------------------
#  ゴールドを表示するウィンドウです。
#==============================================================================
class Window_Gold < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 0, 200, 64)
self.contents = Bitmap.new(width - 35, height - 35)
self.contents.font.name = $fontface
self.contents.font.size = 21
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
cx = contents.text_size("Gil").width
self.contents.font.color = outline_color
self.contents.draw_text(81, - 1, 100-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.draw_text(81, 1, 100-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.draw_text(79, 1, 100-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.draw_text(79, - 1, 100-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = normal_color
self.contents.draw_text(80, 0, 100-cx-2, 32, $game_party.gold.to_s, 2)
self.contents.font.color = outline_color
self.contents.draw_text(- 1, - 1, cx, 32, "Gil", 2)
self.contents.draw_text(1, 1, cx, 32, "Gil", 2)
self.contents.draw_text(- 1, 1, cx, 32, "Gil", 2)
self.contents.draw_text(1, - 1, cx, 32, "Gil", 2)
self.contents.font.color = Color.new(254, 230, 159, 255)
self.contents.draw_text(0, 0, cx, 32, "Gil", 2)
end
end
#==============================================================================
# ■ Window_PlayTime
#------------------------------------------------------------------------------
#  メニュー画面でプレイ時間を表示するウィンドウです。
#==============================================================================
class Window_PlayTime < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 0, 200, 70)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = 21
self.opacity = 0
refresh
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = outline_color
self.contents.draw_text(1, - 1, 120, 32, "Spielzeit:")
self.contents.draw_text(1, 1, 120, 32, "Spielzeit:")
self.contents.draw_text(-1, - 1, 120, 32, "Spielzeit:")
self.contents.draw_text(-1, 1, 120, 32, "Spielzeit:")
self.contents.font.color = Color.new(254, 230, 159, 255)
self.contents.draw_text(0, 0, 120, 32, "Spielzeit:")
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = outline_color
self.contents.draw_text(39, - 1, 120, 32, text, 2)
self.contents.draw_text(39, 1, 120, 32, text, 2)
self.contents.draw_text(41, 1, 120, 32, text, 2)
self.contents.draw_text(41, -1, 120, 32, text, 2)
self.contents.font.color = normal_color
self.contents.draw_text(40, 0, 120, 32, text, 2)
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
#==============================================================================
# ■ Window_MenuStatus
#------------------------------------------------------------------------------
#  メニュー画面でパーティメンバーのステータスを表示するウィンドウです。
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 0, 480, 430)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
refresh
self.active = false
self.index = -1
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.actors.size
for i in 0...$game_party.actors.size
x = 100 - i * 18
y = i * 100
actor = $game_party.actors
draw_actor_face(actor, x - 40, y + 80)
draw_actor_name2(actor, x + 50, y)
draw_actor_class2(actor, x + 50, y + 50)
draw_actor_level2(actor, x + 50, y + 25)
draw_actor_state2(actor, x + 155, y + 50)
draw_actor_hp2(actor, x + 140, y )
draw_actor_sp2(actor, x + 140, y + 25)
draw_actor_barz(actor, x + 140, y + 25, "horizontal", 130, 1, actor.hp, actor.maxhp, Color.new(254, 238, 189, 255), Color.new(182, 137, 2, 255))
draw_actor_barz(actor, x + 140, y + 50, "horizontal", 130, 1, actor.sp, actor.maxsp, Color.new(74, 230, 51, 225), Color.new(35, 150, 19, 225))
end
end
#--------------------------------------------------------------------------
# ● カーソルの矩形更新
#--------------------------------------------------------------------------
def update_cursor_rect
self.cursor_rect.empty
end
end
#==============================================================================
# ■ Window_Item
#------------------------------------------------------------------------------
#  アイテム画面、バトル画面で、所持アイテムの一覧を表示するウィンドウです。
#==============================================================================
class Window_Menuitem < Window_Itemselectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize
super(0, 500, 640, 380)
@column_max = 2
refresh
self.index = 0
self.opacity = 0
# 戦闘中の場合はウィンドウを画面中央へ移動し、半透明にする
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#--------------------------------------------------------------------------
# ● アイテムの取得
#--------------------------------------------------------------------------
def item
return @data[self.index]
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
# アイテムを追加
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items[i])
end
end
# 戦闘中以外なら武器と防具も追加
unless $game_temp.in_battle
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
@data.push($data_weapons[i])
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
@data.push($data_armors[i])
end
end
end
# 項目数が 0 でなければビットマップを作成し、全項目を描画
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# ● 項目の描画
# index : 項目番号
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.font.color = normal_color
else
self.contents.font.color = Color.new(255, 255, 255, 200)
end
x = 4 + index % 2 * (270 + 25) + 12
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
if item.is_a?(RPG::Item) and
$game_party.item_can_use?(item.id)
self.contents.draw_text_outline(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text_outline(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text_outline(x + 256, y, 24, 32, number.to_s, 2)
else
self.contents.draw_text_outline2(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text_outline2(x + 240, y, 16, 32, ":", 1)
self.contents.draw_text_outline2(x + 256, y, 24, 32, number.to_s, 2)
end
end
#--------------------------------------------------------------------------
# ● ヘルプテキスト更新
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.item == nil ? "" : self.item.description)
end
end
#==============================================================================
# ■ Window_Menuskill
#------------------------------------------------------------------------------
#
#==============================================================================
class Window_Menuskill < Window_Itemselectable
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# actor : アクター
#--------------------------------------------------------------------------
def initialize(actor)
super(- 3, 531, 640, 352)
@actor = actor
@column_max = 2
refresh
self.index = 0
# 戦闘中の場合はウィンドウを画面中央へ移動し、半透明にする
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#--------------------------------------------------------------------------
# ● スキルの取得
#--------------------------------------------------------------------------
def skill
return @data[self.index]
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
@data = []
for i in 0...@actor.skills.size
skill = $data_skills[@actor.skills[i]]
if skill != nil
@data.push(skill)
end
end
# 項目数が 0 でなければビットマップを作成し、全項目を描画
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 32, row_max * 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
for i in 0...@item_max
draw_item(i)
end
end
end
#--------------------------------------------------------------------------
# ● 項目の描画
# index : 項目番号
#--------------------------------------------------------------------------
def draw_item(index)
skill = @data[index]
if @actor.skill_can_use?(skill.id)
self.contents.font.color = normal_color
else
self.contents.font.color = Color.new(255, 255, 255, 200)
end
x = 4 + index % 2 * (270 + 25) + 12
y = index / 2 * 32
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(skill.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
if @actor.skill_can_use?(skill.id)
self.contents.draw_text_outline(x + 28, y, 204, 32, skill.name, 0)
self.contents.draw_text_outline(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
else
self.contents.draw_text_outline2(x + 28, y, 204, 32, skill.name, 0)
self.contents.draw_text_outline2(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
end
end
#--------------------------------------------------------------------------
# ● ヘルプテキスト更新
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(self.skill == nil ? "" : self.skill.description)
end
end
#==============================================================================
# ■ Window_SkillStatus
#------------------------------------------------------------------------------
#  スキル画面で、スキル使用者のステータスを表示するウィ&
1. Da man da einiges ändern muss nun die Frage ob du das Script dir nocxh irgendwie angepasst hast oder ob ich die version nehmen kann editieren und dir zuschicken kann?
2. Da sagtest du "Bei dem Classenchange kann ich durch drücken der rechten Pfeiltaste die EXP anheben und das Level der Klasse erhöhern - was nicht passieren soll."
Nun nun meine Frage tritt das nur auf wenn du das Spiel über den Editor startest oder auch wenn du die Game.exe über den Explorer startest?
Ave Abt
2. Da sagtest du "Bei dem Classenchange kann ich durch drücken der rechten Pfeiltaste die EXP anheben und das Level der Klasse erhöhern - was nicht passieren soll."
Nun nun meine Frage tritt das nur auf wenn du das Spiel über den Editor startest oder auch wenn du die Game.exe über den Explorer startest?
Ave Abt
Nun... das teste ich mal schnell... mom
...
Das funktioniert bei beiden Anwendungsmöglichkeiten...
Maci
Edit:
Also ich hatte die Bilder verändert, das weicht schonmal vom Standart FFMenü ab, und ich habe die sachen umbenannt die umzubenennen waren... falls du das meisnt.
Sonst habe ich nicths geändert.
Du kannst den Script ruhig ändern.
...
Das funktioniert bei beiden Anwendungsmöglichkeiten...
Maci
Edit:
Also ich hatte die Bilder verändert, das weicht schonmal vom Standart FFMenü ab, und ich habe die sachen umbenannt die umzubenennen waren... falls du das meisnt.
Sonst habe ich nicths geändert.
Du kannst den Script ruhig ändern.
Also ich hab das nun mal austesten können und ich muss leider sagen das da was nicht klappt da dort ein Fehler auftritt.
Es ist immer unterschiedlich (der Fehler).
Hier nochmal der Anhang mit provisorischem Bild des Buttons.
Edit: Scene habe ich Party benannt... falls das wichtig ist - wovon ich ausgehe.
Es ist immer unterschiedlich (der Fehler).
Hier nochmal der Anhang mit provisorischem Bild des Buttons.
Edit: Scene habe ich Party benannt... falls das wichtig ist - wovon ich ausgehe.




YAams
Random Signatur