RPG-Forum: {Script} Choisir le nom du héros - RPG-Forum

Aller au contenu

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Dernière »

{Script} Choisir le nom du héros

#1 L'utilisateur est hors-ligne   wwwx Icône

  • Maker Solitaire
  • PipPipPipPipPip
  • Groupe : Membres ++
  • Messages : 989
  • Inscrit(e) : 05-janvier 06
  • Gender:Male
  • Location:Melee-Magthere, caserne des elfes noirs

Posté 16 mai 2006 - 12:02

Le script que j'ai modifié :

commencez par créé un nouveau script tout en haut avant Game_Temp que vous appelerez
Keyboard*** dans lequel vous mettrez :

#======================================================= 
# 
# Keyboard script version2bis								   offert à Rpg Legends par wwwx
# 
#======================================================= 

module Kboard 
  
  $RMouse_BUTTON_L = 0x01		# left mouse button 
  $RMouse_BUTTON_R = 0x02		# right mouse button 
  $RMouse_BUTTON_M = 0x04		# middle mouse button 
  $RMouse_BUTTON_4 = 0x05		# 4th mouse button # only tested with win2k with a logitech mouse (MX900) 
  $RMouse_BUTTON_5 = 0x06		# 5th mouse button # only tested with win2k with a logitech mouse (MX900) 

  $R_Key_BACK	  = 0x08		# BACKSPACE key 
  $R_Key_TAB	   = 0x09		# TAB key 
  $R_Key_RETURN	= 0x0D		# ENTER key 
  $R_Key_SHIFT	 = 0x10		# SHIFT key 
  $R_Key_PAUSE	 = 0x13		# PAUSE key 
  $R_Key_CAPITAL   = 0x14		# CAPS LOCK key 
  $R_Key_ESCAPE	= 0x1B		# ESC key 
  $R_Key_SPACE	 = 0x20		# SPACEBAR 
  $R_Key_PRIOR	 = 0x21		# PAGE UP key 
  $R_Key_NEXT	  = 0x22		# PAGE DOWN key 
  $R_Key_END	   = 0x23		# END key 
  $R_Key_HOME	  = 0x24		# HOME key 
  $R_Key_LEFT	  = 0x25		# LEFT ARROW key 
  $R_Key_UP		= 0x26		# UP ARROW key 
  $R_Key_RIGHT	 = 0x27		# RIGHT ARROW key 
  $R_Key_DOWN	  = 0x28		# DOWN ARROW key 
  $R_Key_SELECT	= 0x29		# SELECT key 
  $R_Key_PRINT	 = 0x2A		# PRINT key 
  $R_Key_SNAPSHOT  = 0x2C		# PRINT SCREEN key 
  $R_Key_INSERT	= 0x2D		# INS key 
  $R_Key_DELETE	= 0x2E		# DEL key 
  
  $R_Key_0		 = 0x30		# 0 key 
  $R_Key_1		 = 0x31		# 1 key 
  $R_Key_2		 = 0x32		# 2 key 
  $R_Key_3		 = 0x33		# 3 key 
  $R_Key_4		 = 0x34		# 4 key 
  $R_Key_5		 = 0x35		# 5 key 
  $R_Key_6		 = 0x36		# 6 key 
  $R_Key_7		 = 0x37		# 7 key 
  $R_Key_8		 = 0x38		# 8 key 
  $R_Key_9		 = 0x39		# 9 key 

  $R_Key_A		 = 0x41		# A key 
  $R_Key_B		 = 0x42		# B key 
  $R_Key_C		 = 0x43		# C key 
  $R_Key_D		 = 0x44		# D key 
  $R_Key_E		 = 0x45		# E key 
  $R_Key_F		 = 0x46		# F key 
  $R_Key_G		 = 0x47		# G key 
  $R_Key_H		 = 0x48		# H key 
  $R_Key_I		 = 0x49		# I key 
  $R_Key_J		 = 0x4A		# J key 
  $R_Key_K		 = 0x4B		# K key 
  $R_Key_L		 = 0x4C		# L key 
  $R_Key_M		 = 0x4D		# M key 
  $R_Key_N		 = 0x4E		# N key 
  $R_Key_O		 = 0x4F		# O key 
  $R_Key_P		 = 0x50		# P key 
  $R_Key_Q		 = 0x51		# Q key 
  $R_Key_R		 = 0x52		# R key 
  $R_Key_S		 = 0x53		# S key 
  $R_Key_T		 = 0x54		# T key 
  $R_Key_U		 = 0x55		# U key 
  $R_Key_V		 = 0x56		# V key 
  $R_Key_W		 = 0x57		# W key 
  $R_Key_X		 = 0x58		# X key 
  $R_Key_Y		 = 0x59		# Y key 
  $R_Key_Z		 = 0x5A		# Z key 

  $R_Key_LWIN	  = 0x5B		# Left Windows key (Microsoft Natural keyboard) 
  $R_Key_RWIN	  = 0x5C		# Right Windows key (Natural keyboard) 
  $R_Key_APPS	  = 0x5D		# Applications key (Natural keyboard) 

  $R_Key_NUMPAD0   = 0x60		# Numeric keypad 0 key 
  $R_Key_NUMPAD1   = 0x61		# Numeric keypad 1 key 
  $R_Key_NUMPAD2   = 0x62		# Numeric keypad 2 key 
  $R_Key_NUMPAD3   = 0x63		# Numeric keypad 3 key 
  $R_Key_NUMPAD4   = 0x64		# Numeric keypad 4 key 
  $R_Key_NUMPAD5   = 0x65		# Numeric keypad 5 key 
  $R_Key_NUMPAD6   = 0x66		# Numeric keypad 6 key 
  $R_Key_NUMPAD7   = 0x67		# Numeric keypad 7 key 
  $R_Key_NUMPAD8   = 0x68		# Numeric keypad 8 key 
  $R_Key_NUMPAD9 = 0x69		# Numeric keypad 9 key 
  $R_Key_MULTIPLY  = 0x6A		# Multiply key (*) 
  $R_Key_ADD	   = 0x6B		# Add key (+) 
  $R_Key_SEPARATOR = 0x6C		# Separator key 
  $R_Key_SUBTRACT  = 0x6D		# Subtract key (-) 
  $R_Key_DECIMAL   = 0x6E		# Decimal key 
  $R_Key_DIVIDE	= 0x6F		# Divide key (/) 

  $R_Key_F1		= 0x70		# F1 key 
  $R_Key_F2		= 0x71		# F2 key 
  $R_Key_F3		= 0x72		# F3 key 
  $R_Key_F4		= 0x73		# F4 key 
  $R_Key_F5		= 0x74		# F5 key 
  $R_Key_F6		= 0x75		# F6 key 
  $R_Key_F7		= 0x76		# F7 key 
  $R_Key_F8		= 0x77		# F8 key 
  $R_Key_F9		= 0x78		# F9 key 
  $R_Key_F10	   = 0x79		# F10 key 
  $R_Key_F11	   = 0x7A		# F11 key 
  $R_Key_F12	   = 0x7B		# F12 key 

  $R_Key_NUMLOCK   = 0x90		# NUM LOCK key 
  $R_Key_SCROLL	= 0x91		# SCROLL LOCK key 

  $R_Key_LSHIFT	= 0xA0		# Left SHIFT key 
  $R_Key_RSHIFT	= 0xA1		# Right SHIFT key 
  $R_Key_LCONTROL  = 0xA2		# Left CONTROL key 
  $R_Key_RCONTROL  = 0xA3		# Right CONTROL key 
  $R_Key_L_ALT	= 0xA4		# Left ALT key 
  $R_Key_R_ALT	= 0xA5		# Right ALT key 
  
  $R_Key_SEP	  = 0xBC		# , key 
  $R_Key_DASH	  = 0xBD		# - key 
  $R_Key_DOTT	  = 0xBE		# . key 
  
  GetKeyState = Win32API.new("user32","GetAsyncKeyState",['i'],'i') 
  GetKeyboardState = Win32API.new("user32","GetKeyState",['i'],'i') 
  GetSetKeyState = Win32API.new("user32","SetKeyboardState",['i'],'i') 
  
  module_function 
  
  def keyboard(rkey) 
	GetKeyState.call(rkey) & 0x01 == 1  # 
  end 
  
  def key(rkey, key = 0) 
	GetKeyboardState.call(rkey) & 0x01 == key # 
  end 
end



puis créez tout en bas juste au dessus de Main : Text_Input***

dans lequel vous mettrez ceci :


#======================================================= 
# 
# Text-Input script version2bis								offert à Rpg Legends par wwwx
# 
#======================================================= 
class Text_input < Window_Base 
attr_reader   :name 
  def initialize(actor, top_text = "entrez nouveau nom ?", text = "", font = "Arial", max = 6, size = 16, free = "_", max2=20) 
	@toptext = top_text 
	#@text =  text 
	@actor = actor 
	@text = actor.name 
	@font = font#ici mettre la police d'écriture par default c'est Arial 
	@max = max#nombre max de lettre 
	@max2 = max2#taille de la fenetre par default 20 
	@size = size 
	@free = free 
	super(320 - (@max2*@size+@size)/2, 240-@size*2-32, @max2 * @size + 32, 128) 
	self.contents = Bitmap.new(width - 32, height - 32) 
	self.contents.font.name = @font 
	self.contents.font.size = @size 
	self.z = 256 
	@twidth = @max2*@size# 
	@twidth2=@max2*@size-(1/4*@max2) 
	refresh 
	update 
  end 
  def refresh 
	self.contents.clear 
	self.contents.font.color = system_color 
	self.contents.draw_text(0, 0, @twidth, @size, @toptext, 1) 
	for i in 0...@max 
	  text = @text[i] 
	  if text == nil 
		text = @free 
	  else 
		text = text.chr 
	  end 
	  
	  self.contents.font.color = normal_color 
	  self.contents.draw_text(@size * i+ (@max2*@size+@size)/2-(@max*@size+@size)/2, @size + 24, @size, @size, text.to_s, 1)# 
	  draw_actor_graphic(@actor, 10, 45) 
	  end 
  end 
	def update 
	  loop do 
		Graphics.update 
		refresh 
		if Kboard.keyboard($R_Key_BACK) # delete (with backspace) 
		  text = "" 
		  if @text.size != 0 
			for i in 0... (at) text.size - 1 
			  text  += @text[i].chr 
			end 
		  @text = text 
		  else 
		  end 
		end 
		if Kboard.keyboard($R_Key_RETURN) # Enter key... to end... 
		  
		  return 
		end 

		if @text.size < @max 

# putting Key's to the text 

		  if Kboard.keyboard($R_Key_SPACE) # space key (to insert space between the chars... ^-^) 
			@text += " " # space.. you can set anything else if you want ^-^' 
		  end 
		  if Kboard.key($R_Key_CAPITAL, 1) # if caps lock is active then write the chars in higher case 
			if Kboard.keyboard($R_Key_A) 
			  @text += "A" 
			end 
			if Kboard.keyboard($R_Key_B) 
			  @text += "B" 
			end 
			if Kboard.keyboard($R_Key_C) 
			@text += "C" 
			end 
			if Kboard.keyboard($R_Key_D) 
			  @text += "D" 
			end		  
			if Kboard.keyboard($R_Key_E) 
			  @text += "E" 
			end 
			if Kboard.keyboard($R_Key_F) 
			  @text += "F" 
			end 
			if Kboard.keyboard($R_Key_G) 
			  @text += "G" 
			end 
			if Kboard.keyboard($R_Key_H) 
			  @text += "H" 
			end 
			if Kboard.keyboard($R_Key_I) 
			  @text += "I" 
			end 
			if Kboard.keyboard($R_Key_J) 
			  @text += "J" 
			end 
			if Kboard.keyboard($R_Key_K) 
			  @text += "K" 
			end 
			if Kboard.keyboard($R_Key_L) 
			  @text += "L" 
			end 
			if Kboard.keyboard($R_Key_M) 
			  @text += "M" 
			end 
			if Kboard.keyboard($R_Key_N) 
			  @text += "N" 
			end 
			if Kboard.keyboard($R_Key_O) 
			  @text += "O" 
			end 
			if Kboard.keyboard($R_Key_P) 
			  @text += "P" 
			end 
			if Kboard.keyboard($R_Key_Q) 
			  @text += "Q" 
			end 
			if Kboard.keyboard($R_Key_R) 
			  @text += "R" 
			end 
			if Kboard.keyboard($R_Key_S) 
			  @text += "S" 
			end 
			if Kboard.keyboard($R_Key_T) 
			  @text += "T" 
			end 
			if Kboard.keyboard($R_Key_U) 
			  @text += "U" 
			end 
			if Kboard.keyboard($R_Key_V) 
			  @text += "V" 
			end 
			if Kboard.keyboard($R_Key_W) 
			  @text += "W" 
			end 
			if Kboard.keyboard($R_Key_X) 
			  @text += "X" 
			end 
			if Kboard.keyboard($R_Key_Y) 
			  @text += "Y" 
			end 
			if Kboard.keyboard($R_Key_Z) 
			  @text += "Z" 
			end 

		  elsif Kboard.key($R_Key_CAPITAL) # if caps lock is deactivated then write in lower case 

			if Kboard.keyboard($R_Key_A) 
			  @text += "a" 
			end 
			if Kboard.keyboard($R_Key_B) 
			  @text += "b" 
			end 
			if Kboard.keyboard($R_Key_C) 
			@text += "c" 
			end 
			if Kboard.keyboard($R_Key_D) 
			  @text += "d" 
			end		  
			if Kboard.keyboard($R_Key_E) 
			  @text += "e" 
			end 
			if Kboard.keyboard($R_Key_F) 
			  @text += "f" 
			end 
			if Kboard.keyboard($R_Key_G) 
			  @text += "g" 
			end 
			if Kboard.keyboard($R_Key_H) 
			  @text += "h" 
			end 
			if Kboard.keyboard($R_Key_I) 
			  @text += "i" 
			end 
			if Kboard.keyboard($R_Key_J) 
			  @text += "j" 
			end 
			if Kboard.keyboard($R_Key_K) 
			  @text += "k" 
			end 
			if Kboard.keyboard($R_Key_L) 
			  @text += "l" 
			end 
			if Kboard.keyboard($R_Key_M) 
			  @text += "m" 
			end 
			if Kboard.keyboard($R_Key_N) 
			  @text += "n" 
			end 
			if Kboard.keyboard($R_Key_O) 
			  @text += "o" 
			end 
			if Kboard.keyboard($R_Key_P) 
			  @text += "p" 
			end 
			if Kboard.keyboard($R_Key_Q) 
			  @text += "q" 
			end 
			if Kboard.keyboard($R_Key_R) 
			  @text += "r" 
			end 
			if Kboard.keyboard($R_Key_S) 
			  @text += "s" 
			end 
			if Kboard.keyboard($R_Key_T) 
			  @text += "t" 
			end 
			if Kboard.keyboard($R_Key_U) 
			  @text += "u" 
			end 
			if Kboard.keyboard($R_Key_V) 
			  @text += "v" 
			end 
			if Kboard.keyboard($R_Key_W) 
			  @text += "w" 
			end 
			if Kboard.keyboard($R_Key_X) 
			  @text += "x" 
			end 
			if Kboard.keyboard($R_Key_Y) 
			  @text += "y" 
			end 
			if Kboard.keyboard($R_Key_Z) 
			  @text += "z" 
			end 
		  end 
	
# numbers 
		  if Kboard.key($R_Key_CAPITAL, 1) 
			if Kboard.keyboard($R_Key_0) 
			  @text += "0" 
			end 
			if Kboard.keyboard($R_Key_1) 
			  @text += "1" 
			end 
			if Kboard.keyboard($R_Key_2) 
			  @text += "2" 
			end 
			if Kboard.keyboard($R_Key_3) 
			  @text += "3" 
			end 
			if Kboard.keyboard($R_Key_4) 
			  @text += "4" 
			end 
			if Kboard.keyboard($R_Key_5) 
			  @text += "5" 
			end 
			if Kboard.keyboard($R_Key_6) 
			  @text += "6" 
			end 
			if Kboard.keyboard($R_Key_7) 
			  @text += "7" 
			end 
			if Kboard.keyboard($R_Key_8) 
			  @text += "8" 
			end 
			if Kboard.keyboard($R_Key_9) 
			  @text += "9" 
			end 
		  
		  elsif Kboard.key($R_Key_CAPITAL) 
		  
			if Kboard.keyboard($R_Key_0) 
			  @text += "à" 
			end 
			if Kboard.keyboard($R_Key_1) 
			  @text += "&" 
			end 
			if Kboard.keyboard($R_Key_2) 
			  @text += "é" 
			end 
			if Kboard.keyboard($R_Key_4) 
			  @text += "'" 
			end 
			if Kboard.keyboard($R_Key_5) 
			  @text += "(" 
			end 
			if Kboard.keyboard($R_Key_6) 
			  @text += ")" 
			end 
			if Kboard.keyboard($R_Key_7) 
			  @text += "è" 
			end 
			if Kboard.keyboard($R_Key_8) 
			  @text += "_" 
			end 
			if Kboard.keyboard($R_Key_9) 
			  @text += "ç" 
			end 
		  end 
		
# numpad 
		  if Kboard.keyboard($R_Key_NUMPAD0) 
			@text += "0" 
		  end 
		  if Kboard.keyboard($R_Key_NUMPAD1) 
			@text += "1" 
		  end 
		  if Kboard.keyboard($R_Key_NUMPAD2) 
			@text += "2" 
		  end 
		  if Kboard.keyboard($R_Key_NUMPAD3) 
			@text += "3" 
		  end 
		  if Kboard.keyboard($R_Key_NUMPAD4) 
			@text += "4" 
		  end 
		  if Kboard.keyboard($R_Key_NUMPAD5) 
			@text += "5" 
		  end 
		  if Kboard.keyboard($R_Key_NUMPAD6) 
			@text += "6" 
		  end 
		  if Kboard.keyboard($R_Key_NUMPAD7) 
			@text += "7" 
		  end 
		  if Kboard.keyboard($R_Key_NUMPAD8) 
			@text += "8" 
		  end 
		  if Kboard.keyboard($R_Key_NUMPAD9) 
			@text += "9" 
		  end 

		  if Kboard.keyboard($R_Key_ADD) # + (numpad) 
			@text += "+" 
		  end 
		  if Kboard.keyboard($R_Key_SUBTRACT) # - (numpad) 
			@text += "-" 
		  end 
		  if Kboard.keyboard($R_Key_DIVIDE) # / (numpad) 
			@text += "/" 
		  end 
		  if Kboard.keyboard($R_Key_MULTIPLY) # * (numpad) 
			@text += "*" 
		  end 
		  
		  if Kboard.key($R_Key_CAPITAL) # since i dont want to change my keyboard layout you need to test it for you'r self... 
			if Kboard.keyboard($R_Key_SEP) # , (key) (tested german keyboard layout) 
			  @text += "," 
			end 
			if Kboard.keyboard($R_Key_DASH) # - (key) (tested german keyboard layout) 
			  @text += "-" 
			end 
			if Kboard.keyboard($R_Key_DOTT) # . (key) (tested german keyboard layout) 
			  @text += "." 
			end 
		  elsif Kboard.key($R_Key_CAPITAL, 1) 
			if Kboard.keyboard($R_Key_SEP) # , (key) (tested german keyboard layout) 
			  @text += ";" 
			end 
			if Kboard.keyboard($R_Key_DASH) # - (key) (tested german keyboard layout) 
			  @text += "_" 
			end 
			if Kboard.keyboard($R_Key_DOTT) # . (key) (tested german keyboard layout) 
			  @text += ":" 
			end 
		  end 

		else 
		end 
	  refresh 
	end 
  end 
  def text() 
	self.contents.dispose 
	self.dispose 
	return @text 
  end


enfin dans le script "Interpreter 6"

vous trouverez la partie de script :

def command_303 
	# 無効なアクターでなければ 
	if $data_actors[@parameters[0]] != nil 
	  # バトル中断フラグをセット 
	  $game_temp.battle_abort = true 
	  # 名前入力呼び出しフラグをセット 
	  $game_temp.name_calling = true 
	  $game_temp.name_actor_id = @parameters[0] 
	  $game_temp.name_max_char = @parameters[1] 
	end 
	# インデックスを進める 
	@index += 1 
	# 終了 
	return false 
  end

Modifiez la en mettant :
def command_303 
	# 無効なアクターでなければ 
	if $data_actors[@parameters[0]] != nil 
	  # バトル中断フラグをセット 
	  $game_temp.battle_abort = true 
	  # 名前入力呼び出しフラグをセット 
	  #$game_temp.name_calling = true 
	 data = [] 
top_text = "entrez nouveau nom ?" 
text = "" 
font = "Arial" 

size = 24 
	  $game_temp.name_actor_id = @parameters[0] 
	  $game_temp.name_max_char = @parameters[1] 
	  max =$game_temp.name_max_char 
	  actor = $game_actors[$game_temp.name_actor_id] 
	  
	  $game_actors[$game_temp.name_actor_id].name=Text_input.new(actor,top_t ext, text, 
font, max, size).text 
	  
	end 
	# インデックスを進める 
	@index += 1 
	# 終了 
	return false 
  end


il ne vous reste plus qu'a créer un évènement dans lequel vous mettrez l'évènement "entrer le nom du héros"
le seul hic c'est pour les accents "é" ou les "è".
Keep cool...
La réalité, c'est ce qui continue d'exister lorsque l'on cesse d'y croire.
Essayez ceci : chrysador.labrute.fr
0

#2 L'utilisateur est hors-ligne   Walean Icône

  • Chevalier
  • PipPipPipPip
  • Groupe : Membres ++
  • Messages : 426
  • Inscrit(e) : 19-décembre 05
  • Gender:Male
  • Location:Dans tes rêves!!

Posté 16 mai 2006 - 16:18

Ben dis wwwx t'en poste des scripts! Et des très bien!!! Je peux les mettre sur mon site?
Le bleu, c'est la couleur de l'infini...
0

#3 L'utilisateur est hors-ligne   wwwx Icône

  • Maker Solitaire
  • PipPipPipPipPip
  • Groupe : Membres ++
  • Messages : 989
  • Inscrit(e) : 05-janvier 06
  • Gender:Male
  • Location:Melee-Magthere, caserne des elfes noirs

Posté 16 mai 2006 - 16:41

Walean Écrit aujourd, le 17:18 , dit :

Ben dis wwwx t'en poste des scripts! Et des très bien!!! Je peux les mettre sur mon site?

Si tu veux, j'vais pas raler pour ça.
Ce qui serait bien, c'est qu'au moins on me dise comme toi qu'on les apprécis...

Généralement, je vais prendre des idées de script sur des forums (juste l'idée) et je le crée moi-même.
Lorsqu'il y a un bug (c'est assez courant, faut s'y reprendre à plusieures fois), je regarde la différence entre mon script et celui du forum et je compare en essayant de comprendre...
Merci de me dire que tu les aime : ça fait plaisir.

En ce moment, je finis un script sur une option d'auto-équip à la FF9 (le mettrai ce soir) et j'suis toujours sur mon scipt perso d'Intelligence artificielle... un truc dur...
Keep cool...
La réalité, c'est ce qui continue d'exister lorsque l'on cesse d'y croire.
Essayez ceci : chrysador.labrute.fr
0

#4 L'utilisateur est hors-ligne   Relm_ Icône

  • Princesse
  • PipPipPipPipPip
  • Groupe : Validating
  • Messages : 1 304
  • Inscrit(e) : 12-mars 06
  • Location:Tamassa

Posté 16 mai 2006 - 16:50

On pouvait pas mettre le nom sans script extérieur à la base....? :huh:
En tout cas, vivement l'auto-equip ! :)
Envie d'un forum spécialisé sur le making ?
http://e-magination.jeun.fr/
Image IPB
0

#5 L'utilisateur est hors-ligne   wwwx Icône

  • Maker Solitaire
  • PipPipPipPipPip
  • Groupe : Membres ++
  • Messages : 989
  • Inscrit(e) : 05-janvier 06
  • Gender:Male
  • Location:Melee-Magthere, caserne des elfes noirs

Posté 16 mai 2006 - 17:02

Relm_ Écrit aujourd, le 17:50 , dit :

On pouvait pas mettre le nom sans script extérieur à la base....?
En tout cas, vivement l'auto-equip !

On ne pouvais pas choisir le nom comme ça sur la version xp en tout cas...
J'ai mis l'auto-équip (ça marcher pas parce que j'avais oublié un "end", je croyais que ça prendrais plus de temps...
Le lien :Script
Merci Relm d'avoir mis tes remarques.
Keep cool...
La réalité, c'est ce qui continue d'exister lorsque l'on cesse d'y croire.
Essayez ceci : chrysador.labrute.fr
0

#6 L'utilisateur est hors-ligne   Relm_ Icône

  • Princesse
  • PipPipPipPipPip
  • Groupe : Validating
  • Messages : 1 304
  • Inscrit(e) : 12-mars 06
  • Location:Tamassa

Posté 16 mai 2006 - 17:16

Attends, j'ai fais un njeu sur XP où on nom le personnage au début, j'ai pas eu besoin d'y mettre un script... :huh: C'est quoi la différence alors ?
Envie d'un forum spécialisé sur le making ?
http://e-magination.jeun.fr/
Image IPB
0

#7 L'utilisateur est hors-ligne   wwwx Icône

  • Maker Solitaire
  • PipPipPipPipPip
  • Groupe : Membres ++
  • Messages : 989
  • Inscrit(e) : 05-janvier 06
  • Gender:Male
  • Location:Melee-Magthere, caserne des elfes noirs

Posté 16 mai 2006 - 17:18

Lorsque tu crée un héros, la machine te demande son nom.
Quand tu demarres le jeu, le nom est déjà mis par défault.
Tu veux un screen ?
Keep cool...
La réalité, c'est ce qui continue d'exister lorsque l'on cesse d'y croire.
Essayez ceci : chrysador.labrute.fr
0

#8 L'utilisateur est hors-ligne   Relm_ Icône

  • Princesse
  • PipPipPipPipPip
  • Groupe : Validating
  • Messages : 1 304
  • Inscrit(e) : 12-mars 06
  • Location:Tamassa

Posté 16 mai 2006 - 17:21

Si on n'écrit rien dans les bases de données, il n'a pas de nom.
Et puis c'est fréquent qu'un personnage ait un nom déjà écrit à la base mais qu'on puisse l'éffacer.
Dans les FF par exemple.
Envie d'un forum spécialisé sur le making ?
http://e-magination.jeun.fr/
Image IPB
0

#9 L'utilisateur est hors-ligne   wwwx Icône

  • Maker Solitaire
  • PipPipPipPipPip
  • Groupe : Membres ++
  • Messages : 989
  • Inscrit(e) : 05-janvier 06
  • Gender:Male
  • Location:Melee-Magthere, caserne des elfes noirs

Posté 16 mai 2006 - 17:22

Relm_ Écrit aujourd, le 18:21 , dit :

personnage ait un nom déjà écrit à la base mais qu'on puisse l'éffacer.
Dans les FF par exemple.

C'est à ça que sert mon script.
Keep cool...
La réalité, c'est ce qui continue d'exister lorsque l'on cesse d'y croire.
Essayez ceci : chrysador.labrute.fr
0

#10 L'utilisateur est hors-ligne   Relm_ Icône

  • Princesse
  • PipPipPipPipPip
  • Groupe : Validating
  • Messages : 1 304
  • Inscrit(e) : 12-mars 06
  • Location:Tamassa

Posté 16 mai 2006 - 17:25

Ah ok.
Envie d'un forum spécialisé sur le making ?
http://e-magination.jeun.fr/
Image IPB
0

#11 L'utilisateur est hors-ligne   wwwx Icône

  • Maker Solitaire
  • PipPipPipPipPip
  • Groupe : Membres ++
  • Messages : 989
  • Inscrit(e) : 05-janvier 06
  • Gender:Male
  • Location:Melee-Magthere, caserne des elfes noirs

Posté 16 mai 2006 - 17:34

De rien.
Merci pour vos commentaires.
Keep cool...
La réalité, c'est ce qui continue d'exister lorsque l'on cesse d'y croire.
Essayez ceci : chrysador.labrute.fr
0

#12 L'utilisateur est hors-ligne   Walean Icône

  • Chevalier
  • PipPipPipPip
  • Groupe : Membres ++
  • Messages : 426
  • Inscrit(e) : 19-décembre 05
  • Gender:Male
  • Location:Dans tes rêves!!

Posté 16 mai 2006 - 18:08

Citation

scipt perso d'Intelligence artificielle

Alors là je peux t'aider, j'en ai fait plein! (et des complexes!!)
Le bleu, c'est la couleur de l'infini...
0

#13 L'utilisateur est hors-ligne   wwwx Icône

  • Maker Solitaire
  • PipPipPipPipPip
  • Groupe : Membres ++
  • Messages : 989
  • Inscrit(e) : 05-janvier 06
  • Gender:Male
  • Location:Melee-Magthere, caserne des elfes noirs

Posté 16 mai 2006 - 18:10

Walean Écrit aujourd, le 19:08 , dit :

Alors là je peux t'aider, j'en ai fait plein! (et des complexes!!)

Volontiers...
mon script actuel est un script d'Intelligence artificielle pour réa liser un jeu de carte à la FF8.
Tu vois comment c'est ?
Keep cool...
La réalité, c'est ce qui continue d'exister lorsque l'on cesse d'y croire.
Essayez ceci : chrysador.labrute.fr
0

#14 L'utilisateur est hors-ligne   Kirusoka Icône

  • Ecuyer
  • PipPipPip
  • Groupe : Membres ++
  • Messages : 148
  • Inscrit(e) : 13-avril 06
  • Gender:Male

Posté 16 mai 2006 - 23:07

...mm... <_<
Le script d'intelligence m'interesserait !! :)
T'inquietes pas ca ne serait pas pour le copier betement mais pour l'adapter à un jeu de carte de ma création un peu du meme genre que FF8 mais remixé avec le jeu de carte de FF9 ainsi que le jeu feuille pierre ciseaux enfin je travaille sur la réalisation du jeu à la main pour le moment et pour le mettre en jeu il me manque l'IA donc si tu arrives à faire un bon truc j'aimerais voir juste comment tu t'y es pris !! :D
Merci à toi pour tous les scripts que tu postes !! :P
Image IPB
Administrateur : Forum de RPG MaKinG Another WorLd
Site en construction merci du soutien !!
-------------------------------------------------------------------
Image IPB
Which FF Character Are You?
--------------------------------------------------------------------
---------------------------------------------
----------------
---
0

#15 L'utilisateur est hors-ligne   wwwx Icône

  • Maker Solitaire
  • PipPipPipPipPip
  • Groupe : Membres ++
  • Messages : 989
  • Inscrit(e) : 05-janvier 06
  • Gender:Male
  • Location:Melee-Magthere, caserne des elfes noirs

Posté 17 mai 2006 - 06:02

Kirusoka Écrit aujourd, le 00:07 , dit :

...mm...
Le script d'intelligence m'interesserait !!

Désolé mais sans l'aide de Walean ou d'autres, il me faudra encore une bonne semaine pour le faire fonctionner à la perfection.
Je vais faire un script "anti-lag" avec l'aide d'un ami dans deux heures.
On le mettra cet aprèm.
Merci,
Keep cool...
La réalité, c'est ce qui continue d'exister lorsque l'on cesse d'y croire.
Essayez ceci : chrysador.labrute.fr
0

#16 L'utilisateur est hors-ligne   Walean Icône

  • Chevalier
  • PipPipPipPip
  • Groupe : Membres ++
  • Messages : 426
  • Inscrit(e) : 19-décembre 05
  • Gender:Male
  • Location:Dans tes rêves!!

Posté 18 mai 2006 - 18:08

oui je vois comment c'est...
mais c'est un script d'intelligence pour générer les cartes, c'est ça?
si c'est ça je peux t'aider...
si non, je peux t'aider aussi... j'ai vraiment l'habitude de l'IA!!! (lol)
Le bleu, c'est la couleur de l'infini...
0

#17 L'utilisateur est hors-ligne   wwwx Icône

  • Maker Solitaire
  • PipPipPipPipPip
  • Groupe : Membres ++
  • Messages : 989
  • Inscrit(e) : 05-janvier 06
  • Gender:Male
  • Location:Melee-Magthere, caserne des elfes noirs

Posté 19 mai 2006 - 06:17

Toute aide est la bienvenue.
C'est un script pour que l'adversaire sache ou il doit poser ses cartes pour gagner.
Keep cool...
La réalité, c'est ce qui continue d'exister lorsque l'on cesse d'y croire.
Essayez ceci : chrysador.labrute.fr
0

#18 L'utilisateur est hors-ligne   Walean Icône

  • Chevalier
  • PipPipPipPip
  • Groupe : Membres ++
  • Messages : 426
  • Inscrit(e) : 19-décembre 05
  • Gender:Male
  • Location:Dans tes rêves!!

Posté 19 mai 2006 - 18:14

ah ben c'est tout bête alors!!!

mais... qu'il gagne à tous les coups??? :blink:
bonjour l' IA!!! :D
Le bleu, c'est la couleur de l'infini...
0

#19 L'utilisateur est hors-ligne   wwwx Icône

  • Maker Solitaire
  • PipPipPipPipPip
  • Groupe : Membres ++
  • Messages : 989
  • Inscrit(e) : 05-janvier 06
  • Gender:Male
  • Location:Melee-Magthere, caserne des elfes noirs

Posté 19 mai 2006 - 18:44

Pas qu'il gagne à tous les coups : un système réglable en difficulté sur plusieurs niveaux. Ce n'est pas aussi facile que tu le crois mais ton aide reste la bienvenue car je n'ai qu'un ami qui travaille avec moi et il ne s'y connait pas énormement en IA.
Problèmes rencontrés :

Distribution de cartes
-Distribution aléatoire des cartes du joueur_______Problème réglé
-Distribution aléatoire des cartes de l'adversaire (qu'il les aies ou pas)__Problème réglé
-Distribution identique_______Problème réglé
-Distribution toujours la même_______Problème réglé

IA sur le plateau de jeu
-Des cartes se superposent_______Problème réglé
-Les chiffres ne permettent pas de gagner_______Problème réglé
-L'adversaire ne sais pas jouer_______Problème non réglé
-Mise en place de combo_______Problème presque réglé (finitions)
-Fin de la partie => on doit gagner une carte que l'adversaire a joué___Problème non réglé
Keep cool...
La réalité, c'est ce qui continue d'exister lorsque l'on cesse d'y croire.
Essayez ceci : chrysador.labrute.fr
0

#20 L'utilisateur est hors-ligne   Walean Icône

  • Chevalier
  • PipPipPipPip
  • Groupe : Membres ++
  • Messages : 426
  • Inscrit(e) : 19-décembre 05
  • Gender:Male
  • Location:Dans tes rêves!!

Posté 19 mai 2006 - 19:03

Voir le messagewwwx, le vendredi 19 mai 2006 à 18:44, dit :

-Fin de la partie => on doit gagner une carte que l'adversaire a joué___Problème non réglé


Ça c'est facile...

je te fais un algorithme en en français:
$cartes_adv = Array(ici les noms des cartes de l'ennemi=>leur image);
$cartes_joueur = Array(ici les noms des cartes du joueur=>leur image);
//ton code
if(le joueur gagne)
{
foreach($cartes_adv as $nom_carte=>$image_carte)
{
afficher les cartes sous forme d'event ou de picture
quand on clique dessus, afficher confirmation, puis ajouter la carte au joueur
}
}
si(l'adversaire gagne-ou l'ordi)
{
foreach($cartes_joueur as $nom_carte=>$image_carte)
{
afficher les cartes sous forme d'event ou de picture
$carte choisie = aléa (1#5)
ajouter la carte ayant pour numéro $carte à l'adversaire
}
}
Le bleu, c'est la couleur de l'infini...
0

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Dernière »


Réponse rapide

  

1 utilisateur(s) en train de lire ce sujet
0 membre(s), 1 invité(s), 0 utilisateur(s) anonyme(s)