Town-AI gibts sowas?
Hallo erst mal ^^,(bin neu hia)
Ich hab ein neues Spiel namens "Risen" in diesem spiel gibt es eine "Town-AI": Npc-Charaterer mit eigenen Tagesabläufen, kollektiver Inteligenz und einene Soziastruturen(so stehts auf der verpackung xD)
gibts sowas auch für den rpg-maker xp?
oda kann mir jemand sowas scripten? ´
Ich hab ein neues Spiel namens "Risen" in diesem spiel gibt es eine "Town-AI": Npc-Charaterer mit eigenen Tagesabläufen, kollektiver Inteligenz und einene Soziastruturen(so stehts auf der verpackung xD)
gibts sowas auch für den rpg-maker xp?
oda kann mir jemand sowas scripten? ´
Es gibt ein Tag/Nachtskript,schau mal in "Itzama Skripts " nach.
Das Skript bietet Wechsel zwischen Tag und Nacht, du kannst also einstellen, wann Npc's da sind, oder wann sie nicht da sind.
gruß,
dackel
Das Skript bietet Wechsel zwischen Tag und Nacht, du kannst also einstellen, wann Npc's da sind, oder wann sie nicht da sind.
gruß,
dackel
-
Mein Projekt
-
Skripts
Mein(e) Skript(s):
Malscript Version: 0.2
By: Dark Dackel
Einleitung
Ihr wollt etwas Abwechslungsreiches in euer Game bauen?Dann nehmt das Malskript!
Mit dem Malskript kann man in eine Scene springen, in der einem
ein Blatt,und verschiedene Farben zur Verfügnung gestellt wird.
Siehe Link:
http://www.rpg-studio.de/scriptdb/de/Malscript.html
zum Lesen den Text mit der Maus markieren
Waffenbuch Version: 0.2
By: Dark Dackel
Einleitung
Ein einfaches Waffenbuch, funktioniert als Art Lexikon, ihr wählt in der UB aus, über welcher Waffe ihr mehr erfahren wollt und es wird dann angezeigt Weiterlesen...zum Lesen den Text mit der Maus markieren -
Contests

-
Sonstiges
Benutzerinformationen überspringen
Motto: Wer anderen eine Bratwurst brät, der hat ein Bratwurstbratgerät.
Welches denn?
Soweit ich weiß sind im RealABS solche Sozialsystemfunktionen eingebaut.
http://www.rpg-studio.de/scriptdb/de/Realistic-ABS.html
Soweit ich weiß sind im RealABS solche Sozialsystemfunktionen eingebaut.
http://www.rpg-studio.de/scriptdb/de/Realistic-ABS.html
ehm ich hab das realistic abs im spiel und wollte das tag und nacht system ein bauen das tag un d nahct syste,m geht aber i-wie nich kann das hier dranne liegen?
|
|
Ruby 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 |
#============================================================================== # Time System Script v. 1.02 # by Caldaron (22.12.2006) #============================================================================== SDK.log("Caldaron's Time", 'Caldaron', 1.02, '2006-12-22') if SDK.state("Caldaron's Time") #============================================================================== class Time_System #-------------------------------------------------------------------------- attr_accessor :area attr_reader :current_weather attr_accessor :freeze_time attr_accessor :freeze_tone attr_accessor :thunder attr_accessor :time_count #-------------------------------------------------------------------------- def initialize @second_length = 60 @minute_length = 60 @hour_length = 24 @day_length = 30 @week_length = 7 @month_length = 12 @last_minute = nil @last_second = [0,0] @freeze_time = false @freeze_tone = false @current_weather = [0, false] @last_map = 0 @last_area = 0 @thunder = false @speed = 1.00 @time_count = [0, 0] @time_overlap = true @frozen = 0 @timer = 1 #============================================================================== # DATE NAMES #============================================================================== @day_name = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] @month_name = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] #============================================================================== # START DATE #============================================================================== @start_time = [58, 56, 11, 25, 3, 619] create_areas end #============================================================================== # AREA DEFINITIONS #============================================================================== def create_areas #-------------------------------------------------------------------------- # Areas #-------------------------------------------------------------------------- @area = [] @area[0] = Area.new(0) @area[1] = Area.new(1) @area[2] = Area.new(2) @area[3] = Area.new(3) #-------------------------------------------------------------------------- # Area Name #-------------------------------------------------------------------------- @area[0].name = "Outside" @area[1].name = "Inside" @area[2].name = "Cave" @area[3].name = "Snow Field" #-------------------------------------------------------------------------- # Weather in this Area? #-------------------------------------------------------------------------- @area[0].weather = true @area[1].weather = false @area[2].weather = false @area[3].weather = true #-------------------------------------------------------------------------- # Speed of Time in this Area? # the higher the Value, the faster the Time #-------------------------------------------------------------------------- @area[0].time_speed = 1.00 @area[1].time_speed = 0.50 @area[2].time_speed = 1.25 @area[3].time_speed = 2.00 #-------------------------------------------------------------------------- # Time overlaps? # true: Different Times with different Speed of Time in different Areas # false: Same Time but different Speed of Time in different Areas #-------------------------------------------------------------------------- @area[0].time_overlap = true @area[1].time_overlap = true @area[2].time_overlap = true @area[3].time_overlap = true #-------------------------------------------------------------------------- # Propabilities of the Weathertypes: # Weather at Position # 1 - rain # 2 - storm # 3 - snow # 4 - hail # 5 - rain with thunder and lightning # 6 - falling leaves (autumn) # 7 - blowing leaves (autumn) # 8 - swirling leaves (autumn) # 9 - falling leaves (green) # 10 - cherry blossom (sakura) petals # 11 - rose petals # 12 - feathers # 13 - blood rain # 14 - sparkles # 15 - user defined # 16 - blowing snow # 17 - meteor shower # 18 - falling ash # 19 - bubbles # Rest of the Percentage will be Sunshine #-------------------------------------------------------------------------- for i in 0...@area.size @area[i].weather_prop = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] end # Outside @area[0].weather_prop[0] = 20 # rain @area[0].weather_prop[1] = 10 # storm @area[0].weather_prop[4] = 10 # thunder # Inside @area[1].weather_prop = @area[0].weather_prop # when @area.weather = false and @area.weather_prop is the same as the last map # (which is in an other area) only the sound will be played # Cave # @area[2].weather_prop needs no editing, because there is no weather ;) # Snow Field @area[3].weather_prop[2] = 20 @area[3].weather_prop[3] = 10 @area[3].weather_prop[15] = 10 #-------------------------------------------------------------------------- # Months influence Propability? #-------------------------------------------------------------------------- @area[0].prop_influence = true @area[1].prop_influence = true @area[2].prop_influence = false @area[3].prop_influence = false #-------------------------------------------------------------------------- # Volume of the Weather #-------------------------------------------------------------------------- @area[0].weather_volume = 100 @area[1].weather_volume = 80 @area[2].weather_volume = 0 @area[3].weather_volume = 100 #-------------------------------------------------------------------------- # Thunder light in this Area? #-------------------------------------------------------------------------- @area[0].thunder = true @area[1].thunder = false @area[2].thunder = false @area[2].thunder = false #-------------------------------------------------------------------------- # Maps included in this Area # Example: @area[6].maps = [6, 13, 19] #-------------------------------------------------------------------------- @area[0].maps = [1, 2] @area[1].maps = [3] @area[2].maps = [4] @area[3].maps = [5] #-------------------------------------------------------------------------- # Day Period # must be Range: (x..y) # must include all hours from 0 to @hours_length-1 #-------------------------------------------------------------------------- @area[0].day_period[0] = (0..3) @area[0].day_period[1] = (4..7) @area[0].day_period[2] = (8..11) @area[0].day_period[3] = (12..15) @area[0].day_period[4] = (16..19) @area[0].day_period[5] = (20..23) @area[1].day_period[0] = (0..23) @area[2].day_period[0] = (0..23) @area[3].day_period = @area[0].day_period #-------------------------------------------------------------------------- # Months influence Tint? #-------------------------------------------------------------------------- @area[0].tint_influence = true @area[1].tint_influence = true @area[2].tint_influence = false @area[3].tint_influence = false end #-------------------------------------------------------------------------- # minutes_to(Area ID, Tint ID) # Max Distance is 1 # Example: # minutes_to(0, 0) * 25 # Value slowly grows from 0 to 25, by dividing the max reachable with the # current minutes in this day period #-------------------------------------------------------------------------- def refresh_tints # initialize_tints # tints must be equal the day_period.size @area[0].tint[0] = [-200 + minutes_to( 0, 0) * 25, -175 + minutes_to( 0, 0) * 25, -100, 32] @area[0].tint[1] = [-175 + minutes_to( 0, 1) * 75, -150 + minutes_to( 0, 1) * 75, -100 + minutes_to( 0, 1) * 50, 32 - minutes_to( 0, 1) * 16] @area[0].tint[2] = [-100 + minutes_to( 0, 2) * 85, -75 + minutes_to( 0, 2) * 60, -50 + minutes_to( 0, 2) * 35, 16 - minutes_to( 0, 2) * 16] @area[0].tint[3] = [ -15 - minutes_to( 0, 3) * 20, -15 - minutes_to( 0, 3) * 35, -15 - minutes_to( 0, 3) * 60, 0 + minutes_to( 0, 3) * 8] @area[0].tint[4] = [ -35 - minutes_to( 0, 4) * 75, -50 - minutes_to( 0, 4) * 50, -75 - minutes_to( 0, 4) * 25, 8 + minutes_to( 0, 4) * 8] @area[0].tint[5] = [-110 - minutes_to( 0, 5) * 90, -100 - minutes_to( 0, 5) * 75, -100, 16 + minutes_to( 0, 5) * 16] @area[1].tint[0] = [0, 0, 0, 0] @area[2].tint[0] = [-20, -40, -60, 0] @area[3].tint = @area[0].tint for i in 0...@area[0].tint.size @area[3].tint[i][2] = @area[0].tint[i][2]-20 end end #-------------------------------------------------------------------------- # tone[0] = red / tone[1] = green / tone[2] = blue / tone[3] = gray #-------------------------------------------------------------------------- def month_tint(tone, i) tona = [] if @area[i].tint_influence case months when 1 tona.push(tone[0]-10, tone[1]-10, tone[2], tone[3] + 8) else tona.push(tone[0], tone[1], tone[2], tone[3]) end else tona.push(tone[0], tone[1], tone[2], tone[3]) end return tona end #-------------------------------------------------------------------------- def month_weather(prop, i) # 0 - rain # 1 - storm # 2 - snow # 3 - hail # 4 - rain with thunder and lightning # 5 - falling leaves (autumn) # 6 - blowing leaves (autumn) # 7 - swirling leaves (autumn) # 8 - falling leaves (green) # 9 - cherry blossom (sakura) petals # 10 - rose petals # 11 - feathers # 12 - blood rain # 13 - sparkles # 14 - user defined # 15 - blowing snow # 16 - meteor shower # 17 - falling ash # 18 - bubbles if @area[i].prop_influence case months when 1, 2, 12 prop[0] = 0 prop[1] = 0 prop[2] += @area[i].weather_prop[0] prop[3] += @area[i].weather_prop[4] prop[4] = 0 prop[15] += @area[i].weather_prop[1] when 3..5 prop[0] /= 2 prop[1] /= 2 prop[9] += @area[i].weather_prop[0]/2 prop[10] += @area[i].weather_prop[1]/2 when 6..8 # is the standard definition of weather_prop when 9..11 prop[0] /= 2 prop[1] /= 2 prop[4] /= 2 prop[5] += @area[i].weather_prop[0]/2 prop[6] += @area[i].weather_prop[1]/2 prop[7] += @area[i].weather_prop[4]/2 end end return prop end #-------------------------------------------------------------------------- # NO MORE TO EDIT #-------------------------------------------------------------------------- def tone_change for i in 0...@area.size next unless @area[i].maps.include?($game_map.map_id) weather_control(i) unless @last_map == $game_map.map_id for j in 0...@area[i].day_period.size next unless @area[i].day_period[j].include?(hours) @last_map = $game_map.map_id @last_area = i @speed = @area[i].time_speed if @area[i].time_speed != 0 @freeze_time = true if @area[i].time_speed == 0 @time_overlap = @area[i].time_overlap unless @freeze_time or @freeze_tone refresh_tints tone = month_tint(@area[i].tint[j], i) $game_screen.start_tone_change(Tone.new(tone[0], tone[1], tone[2], tone[3]), 0) end end end end #-------------------------------------------------------------------------- def weather_control(id) @thunder = @area[id].thunder weather = [] weather = month_weather(@area[id].weather_prop.clone, id) if @last_area != id and weather[@current_weather[0]-1] == 0 change_weather else $game_screen.weather(0, 0, 0) unless @area[id].weather play_weather_sound(@current_weather[0], @area[id].weather_volume) if $game_screen.weather_type == 0 and @area[id].weather and @current_weather[1] $game_screen.weather(@current_weather[0], rand(50)+1, 0) end end end #-------------------------------------------------------------------------- def change_weather for i in 0...@area.size next unless @area[i].maps.include?($game_map.map_id) weather = [] weather = month_weather(@area[i].weather_prop.clone, i) id = i for j in 0...weather.size if weather[j] >= rand(100)+1 if @area[i].weather $game_screen.weather(j+1, rand(50)+1, 500) @current_weather = [j+1, true] end play_weather_sound(j+1, @area[i].weather_volume) return end end end if @area[id].weather $game_screen.weather(0, 0, 500) play_weather_sound(0, 0) @current_weather = [0, false] else $game_screen.weather(0, 0, 0) play_weather_sound(0, 0) end end #-------------------------------------------------------------------------- def play_weather_sound(type, volume) @type = type bgs = BGS.new bgs.volume = volume bgs.pitch = 100 @type = 0 if volume == 0 case @type when 1 bgs.name = "005-Rain01" $game_system.bgs_play(bgs) when 2 bgs.name = "006-Rain02" $game_system.bgs_play(bgs) when 4, 5 bgs.name = "007-Rain03" $game_system.bgs_play(bgs) when 6 bgs.name = "001-Wind01" $game_system.bgs_play(bgs) when 7 bgs.name = "002-Wind02" $game_system.bgs_play(bgs) when 8 bgs.name = "003-Wind03" $game_system.bgs_play(bgs) when 12 bgs.name = "005-Rain01" $game_system.bgs_play(bgs) when 15 bgs.name = "004-Wind04" $game_system.bgs_play(bgs) else $game_system.bgs_fade(0) unless $game_map.map.autoplay_bgs $game_system.bgs_play($game_map.map.bgs) if $game_map.map.autoplay_bgs end end #-------------------------------------------------------------------------- def minutes_to(id, period) return 0 unless @area[id].day_period[period].include?(hours) @minutes = minutes @hours = hours area = @area[id].day_period[period] @minutes += (@hours - area.min) * @minute_length @minutes /= (((area.max - area.min) * @minute_length) + @minute_length - 1.00) return @minutes end #============================================================================== # TIME DEFINITIONS #============================================================================== def seconds(total = false) unless @freeze_time @time_count[0] = Graphics.frame_count - @frozen @time_count[1] += 0.12 @timer = @time_count[0] * @speed if @time_overlap @timer = @time_count[1] * @speed unless @time_overlap @last_second[0] = @timer + @start_time[0] @last_second[1] = (@timer + @start_time[0]) % @second_length return Integer(@timer + @start_time[0]) if total return Integer(@timer + @start_time[0]) % @second_length else @frozen = Graphics.frame_count - @time_count[0] return Integer(@last_second[0]) if total return Integer(@last_second[1]) end end #-------------------------------------------------------------------------- def minutes(total = false) return Integer(seconds(true)/@second_length + @start_time[1]) if total return Integer(seconds(true)/@second_length + @start_time[1]) % @minute_length end #-------------------------------------------------------------------------- def hours(total = false) return Integer(minutes(true)/@minute_length + @start_time[2]) if total return Integer(minutes(true)/@minute_length + @start_time[2]) % @hour_length end #-------------------------------------------------------------------------- def days(total = false) return Integer(hours(true)/@hour_length + @start_time[3]-1) if total return Integer(hours(true)/@hour_length + @start_time[3] - 1) % @day_length + 1 end #-------------------------------------------------------------------------- def months(total = false) return Integer(days(true)/@day_length + @start_time[4]) if total return Integer(days(true)/@day_length + @start_time[4]) % @month_length end #-------------------------------------------------------------------------- def years return Integer(months(true)/@month_length + @start_time[5]) end #============================================================================== # TIME NAMES #============================================================================== def day_name return @day_name[(days % @week_length)-1] end #-------------------------------------------------------------------------- def month_name return @month_name[(months % @month_length)-1] end #-------------------------------------------------------------------------- end #============================================================================== class Time_System #============================================================================== class Area #-------------------------------------------------------------------------- attr_accessor :id attr_accessor :name attr_accessor :weather attr_accessor :weather_prop attr_accessor :prop_influence attr_accessor :weather_volume attr_accessor :thunder attr_accessor :maps attr_accessor :day_period attr_accessor :tint attr_accessor :tint_influence attr_accessor :time_speed attr_accessor :time_overlap #-------------------------------------------------------------------------- def initialize(id) @id = id @name = "" @weather = false @weather_prop = [] @prop_influence = false @weather_volume = 100 @thunder = false @maps = [] @day_period = [] @tint = [] @tint_influence = false @time_speed = 1.00 @time_overlap = false end #-------------------------------------------------------------------------- end #============================================================================== end #============================================================================== class Scene_Title #-------------------------------------------------------------------------- alias caldaron_time_title_data main_database #-------------------------------------------------------------------------- def main_database caldaron_time_title_data $time = Time_System.new end #-------------------------------------------------------------------------- end #============================================================================== class Game_Map #-------------------------------------------------------------------------- attr_reader :map #-------------------------------------------------------------------------- alias caldaron_time_map_init initialize def initialize @weather_wait = 0 caldaron_time_map_init end #-------------------------------------------------------------------------- alias caldaron_time_map_update update def update if $scene.is_a?(Scene_Map) $time.tone_change @weather_wait -= 1 if @weather_wait > 0 if @weather_wait == 0 $time.change_weather @weather_wait = rand(4000) + 2000 end end caldaron_time_map_update end #-------------------------------------------------------------------------- def autoplay if @map.autoplay_bgm $game_system.bgm_play(@map.bgm) end if @map.autoplay_bgs and $time.current_weather[0] == 0 $game_system.bgs_play(@map.bgs) end end #-------------------------------------------------------------------------- end #============================================================================== class Scene_Save < Scene_File #-------------------------------------------------------------------------- alias caldaron_time_save_write write_data def write_data(file) caldaron_time_save_write(file) Marshal.dump($time, file) end #-------------------------------------------------------------------------- end #============================================================================== class Scene_Load < Scene_File #-------------------------------------------------------------------------- alias caldaron_time_load_read read_data def read_data(file) caldaron_time_load_read(file) $time = Marshal.load(file) end #-------------------------------------------------------------------------- end #============================================================================== class BGS #-------------------------------------------------------------------------- attr_accessor :name attr_accessor :volume attr_accessor :pitch #-------------------------------------------------------------------------- def initialize @name = "" @volume = 80 @pitch = 100 end #-------------------------------------------------------------------------- end #============================================================================== end |
zum Lesen den Text mit der Maus markieren
Benutzerinformationen überspringen
Motto: Wer anderen eine Bratwurst brät, der hat ein Bratwurstbratgerät.
Keine Ahnung, was heißt denn "geht irgendwie nicht"? ^^
Benutzerinformationen überspringen
Motto: Wer anderen eine Bratwurst brät, der hat ein Bratwurstbratgerät.
Also du hast das SDK, das Realistic ABS, das Tag-&Nachtsytem und das Timesystem drin?
Benutzerinformationen überspringen
Motto: Wer anderen eine Bratwurst brät, der hat ein Bratwurstbratgerät.
Doch, es wird Nacht, aber da du seconds_length und minutes_length auf 60, die Framerate auf 40 und die Startstunde auf 11 hast, dauert es ca (9*60*60)/40 Sekunden bis es Nacht wird und das sind 810. Es dauert also mehr als 10 Minuten ;)
Ähnliche Themen
-
Maker-Talk »-
kann ein dorf zu groß sein?
(8. März 2009, 01:18)
-
Einsteigerhilfe »-
Problem mit Port Town
(25. Januar 2009, 10:58)
-
Events & Technik »-
Mappen
(22. April 2006, 22:10)
-
Maker-Talk »-
KS - Bilder
(15. August 2005, 04:47)

Games
