Oyez, oyez !

Les résultats du vote sur les meilleurs RPG de tous les temps sont désormais dévoilés dans ce message !

Merci à toutes et à tous pour votre participation !

N'hésitez pas à aller commenter, ajouter des jeux auxquels vous n'auriez pas pensé...

Weidu: Ajouter une animation dans un fichier are

Regroupe tous les sujets sur les commandes, les fonctions, les routines, les modifications des fichiers systèmes (ids, 2da...)...
Répondre
Avatar du membre
Faust
Adepte de Grondemarteau
Loup noir
Messages : 291
Enregistré le : mer. 15 avr. 2009, 12:04
Localisation : Wherever I may roam
Statut : Hors ligne

Weidu: Ajouter une animation dans un fichier are

.

Message par Faust »

Hello,

J'ai réussi à grapiller un peu de code sur un sujet ouvert par Freddy, mais je ne parviens pas trouver un code complet, voici ce que j'ai:

LPF fj_are_structure
INT_VAR
fj_loc_x = 2560
fj_loc_y = 2592
fj_flags = 0b00000000000000000001000001000101 // variable recopiée dans NI et correspondant aux "flags"
STR_VAR
fj_structure_type = animation
fj_name e[y]efr = // Nom de l'animation
fj_bam_resref e[y]efr = // Fichier bam utilisé
END

Dans le contexte suivant:


COPY_EXISTING ~ARD013.are~ ~override/ARD013.are~
READ_ASCII 0x0094 old_script (8)
PATCH_IF ("%oldscript%" STRING_EQUAL "") OR ("%old%_script%" STRING_COMPARE_CASE "none") BEGIN // Si la carte n'a pas de script
WRITE_ASCII 0x0094 ~ARD013~
INNER_ACTION BEGIN
EXTEND_BOTTOM ~ARD013.bcs~ ~El[r]in_Dragosh/Scripts/[EL]D013.BAF~
END
LPF fj_are_structure INT_VAR fj_loc_x = 2482 fj_loc_y = 595 fj_orientation = 0 STR_VAR fj_structure_type ="actor" fj_name ="Crane" fj_cre_resref ="C[R]ANE2" fj_dlg_resref ="C[R]ANE2"
END // Si la carte possède un script
INNER_ACTION BEGIN
EXTEND_BOTTOM ~ARD013.bcs~ ~El[r]in_Dragosh/Scripts/[EL]D013.BAF~ // On ajoute ton bout de script à l'existant
END

LPF fj_are_structure
INT_VAR
ab_RT_Type = 1 // Type of trigger -- 0=proximity ; 1=info ; 2=travel
ab_RT_BbLX = 2630 // Bounding Box - low x value - LEFT
ab_RT_BbLY = 385 // Bounding Box - low y value - TOP
ab_RT_BbHX = 2946 // Bounding Box - High x value - RIGHT
ab_RT_BbHY = 740 // Bounding Box - High y value - BOTTOM
ab_RT_VxPr = 4 // Number of Vertex
ab_RT_CuId = 22 // Cursor
ab_RT_Vx_X_0 = 2630 // Position X
ab_RT_LPoY = 385 // Position Y
ab_RT_TSet = 1 // Trigger Value
ab_RT_Vx_Y_0 =740
ab_RT_Vx_X_1 =2946
ab_RT_Vx_Y_1 =740
ab_RT_Vx_X_2 =2946
ab_RT_Vx_Y_2 =385
ab_RT_Vx_X_3 =2630
ab_RT_Vx_Y_3 =385
STR_VAR
ab_RT_Name = ~c[R]ane2~ // Name of trigger
ab_RT_Rbcs =~c[R]ane2~ // Script file
END

LPF fj_are_structure
INT_VAR
fj_loc_x = 2560
fj_loc_y = 2592
fj_flags = 0b00000000000000000001000001000101 // variable recopiée dans NI et correspondant aux "flags"
STR_VAR
fj_structure_type = animation
fj_name e[y]efr = // Nom de l'animation
fj_bam_resref e[y]efr = // Fichier bam utilisé
END

END
BUT_ONLY

Bien sûr la seconde partie ne fonctionne pas et weidu arrête l'installation du module.

Merci pour votre aide.

Edit: J'ai peut-être trouvé viewtopic.php?p=298083&hilit=fj_are_structure#p298083

Edit2: Hélas non
Modifié en dernier par Faust le jeu. 11 avr. 2024, 22:48, modifié 4 fois.
JohnBob
d'Oghmatique
Ogre mage
Messages : 1304
Enregistré le : mar. 28 sept. 2021, 19:52
Localisation : France
Contact :
Statut : Hors ligne
.

Message par JohnBob »

Faust a écrit : jeu. 11 avr. 2024, 22:25LPF fj_are_structure
INT_VAR
fj_loc_x = 2560
fj_loc_y = 2592
fj_flags = 0b00000000000000000001000001000101 // variable recopiée dans NI et correspondant aux "flags"
STR_VAR
fj_structure_type = animation
fj_name e[y]efr = // Nom de l'animation
fj_bam_resref e[y]efr = // Fichier bam utilisé
END

JohnBob a écrit :LPF fj_are_structure
INT_VAR
fj_loc_x = 2560
fj_loc_y = 2592
fj_flags = 0b00000000000000000001000001000101 // variable recopiée dans NI et correspondant aux "flags"
STR_VAR
fj_structure_type = animation
fj_name = e[y]efr // Nom de l'animation
fj_bam_resref = e[y]efr // Fichier bam utilisé
END

Est-ce bien ce block qui pose problème ? Le nom du trigger et la référence du bam sont du mauvais côté.


- 0b00000000000000000001000001000101 À quels flags cela correspond t'il ?



Pour le block précédent, il semble qu'il manque au moins fj_loc_x

Je débute sur l’édition d'Area donc désolé si je fait erreur ou si mes connaissances sont incomplète...

Donc voici tes valeurs intégrées dans un format plus conventionnel (pour m'aider à visualiser plus clairement)

Code : Tout sélectionner

LPF fj_are_structure
INT_VAR
  	fj_type			= 1    // Info point
  	fj_box_left		= 2630 
  	fj_box_top		= 385 
  	fj_box_right		= 2946 
  	fj_box_bottom		= 740 
	ab_RT_VxPr 		= 4 // Number of Vertex ///// PAS SÛR QU'IL SOIT NÉCESSAIRE DE METTRE CETTE LIGNE.
  	fj_cursor_idx		= 22   // curseur ?
      //fj_info_point_strref 	 = RESOLVE_STR_REF (@xxx) ///// SI TU VEUX AJOUTER UNE LIGNE DE TEXTE QUAND ON CLIQUE SUR LE TRIGGER.
  	fj_loc_x		= xxxx ///// QUELLE VALEUR CORRESPOND A X ?... IL SEMBLE QUE LE VERTEX VX_X_0 SOIT À LA MAUVAISE PLACE ET DU COUP PAS DE POSITION X.
  	fj_loc_y		= 385 
	ab_RT_TSet 		= 1 // Trigger Value  ///// CETTE PARTIE JE NE SAIS PAS TROP À QUOI ELLE SERT DÉSOLÉ... ET ELLE SEMBLE TOUJOURS A ZÉRO D'HABITUDE.
  	fj_vertex_0		= 2630  + (740 << 16)
  	fj_vertex_1		= 2946 + (740 << 16)
  	fj_vertex_2		= 2946 + (385 << 16)
  	fj_vertex_3		= 2630 + (385 << 16)
STR_VAR
  	fj_structure_type	= region // CECI SEMBLE MANQUER DANS TON BLOCK
  	fj_name			= c[R]ane2
  	fj_reg_script 		= "c[R]ane2" // ~c[R]ane2~
END



Pour la toute première partie cela me semble bien compliqué pour ajouter le script, ceci devrait suffire, mais peut-être qu'un truc m'échappe...

Code : Tout sélectionner

COPY_EXISTING ~ARD013.ARE~ ~override/ARD013.are~
  WRITE_ASCII 0x94 ~ARD013~ #8  // SUPPLANTERA TOUT AUTRE NOM DE SCRIPT HYPOTHÉTIQUEMENT PRÉSENT.
  BUT_ONLY

  EXTEND_TOP ~ARD013.bcs~ ~El[r]in_Dragosh/Scripts/[EL]D013.BAF~ // CRÉERA UN NOUVEAU BCS S'IL N'Y EN A PAS DÉJÀ UN ET SINON AJOUTERA TON SCRIPT EN HAUT DE CELUI EXISTANT. 
  //(OU EN BAS AVEC EXTEND_BOTTOM SI TU PRÉFÈRES).
  

LPF 
fj_are_structure 
INT_VAR 
fj_loc_x = 2482 
fj_loc_y = 595 
fj_orientation = 0 
STR_VAR 
fj_structure_type = actor
fj_name ="Crane" 
fj_cre_resref ="C[R]ANE2" 
fj_dlg_resref ="C[R]ANE2"
END
Modifié en dernier par JohnBob le ven. 12 avr. 2024, 04:49, modifié 26 fois.
Avatar du membre
Faust
Adepte de Grondemarteau
Loup noir
Messages : 291
Enregistré le : mer. 15 avr. 2009, 12:04
Localisation : Wherever I may roam
Statut : Hors ligne
.

Message par Faust »

JohnBob a écrit : jeu. 11 avr. 2024, 23:01
Faust a écrit : jeu. 11 avr. 2024, 22:25LPF fj_are_structure
INT_VAR
fj_loc_x = 2560
fj_loc_y = 2592
fj_flags = 0b00000000000000000001000001000101 // variable recopiée dans NI et correspondant aux "flags"
STR_VAR
fj_structure_type = animation
fj_name e[y]efr = // Nom de l'animation
fj_bam_resref e[y]efr = // Fichier bam utilisé
END

JohnBob a écrit :LPF fj_are_structure
INT_VAR
fj_loc_x = 2560
fj_loc_y = 2592
fj_flags = 0b00000000000000000001000001000101 // variable recopiée dans NI et correspondant aux "flags"
STR_VAR
fj_structure_type = animation
fj_name = e[y]efr // Nom de l'animation
fj_bam_resref = e[y]efr // Fichier bam utilisé
END

Est-ce bien ce block qui pose problème ? Le nom du trigger et la référence du bam sont du mauvais côté.


- 0b00000000000000000001000001000101 À quels flags cela correspond t'il ?



Pour le block précédent, il semble qu'il manque au moins fj_loc_x

Je débute sur l’édition d'Area donc désolé si je fait erreur ou si mes connaissances sont incomplète...

Donc voici tes valeurs intégrées dans un format plus conventionnel (pour m'aider à visualiser plus clairement)

Code : Tout sélectionner

LPF fj_are_structure
INT_VAR
  	fj_type			= 1    // Info point
  	fj_box_left		= 2630 
  	fj_box_top		= 385 
  	fj_box_right		= 2946 
  	fj_box_bottom		= 740 
	ab_RT_VxPr 		= 4 // Number of Vertex ///// PAS SÛR QU'IL SOIT NÉCESSAIRE DE METTRE CETTE LIGNE.
  	fj_cursor_idx		= 22   // curseur ?
      //fj_info_point_strref 	 = RESOLVE_STR_REF (@xxx) ///// SI TU VEUX AJOUTER UNE LIGNE DE TEXTE QUAND ON CLIQUE SUR LE TRIGGER.
  	fj_loc_x		= xxxx ///// QUELLE VALEUR CORRESPOND A X ?... IL SEMBLE QUE LE VERTEX VX_X_0 SOIT À LA MAUVAISE PLACE ET DU COUP PAS DE POSITION X.
  	fj_loc_y		= 385 
	ab_RT_TSet 		= 1 // Trigger Value  ///// CETTE PARTIE JE NE SAIS PAS TROP À QUOI ELLE SERT DÉSOLÉ... ET ELLE SEMBLE TOUJOURS A ZÉRO D'HABITUDE.
  	fj_vertex_0		= 2630  + (740 << 16)
  	fj_vertex_1		= 2946 + (740 << 16)
  	fj_vertex_2		= 2946 + (385 << 16)
  	fj_vertex_3		= 2630 + (385 << 16)
STR_VAR
  	fj_structure_type	= region // CECI SEMBLE MANQUER DANS TON BLOCK
  	fj_name			= c[R]ane2
  	fj_reg_script 		= "c[R]ane2" // ~c[R]ane2~
END



Pour la toute première partie cela me semble bien compliqué pour ajouter le script, ceci devrait suffire, mais peut-être qu'un truc m'échappe...

Code : Tout sélectionner

COPY_EXISTING ~ARD013.ARE~ ~override/ARD013.are~
  WRITE_ASCII 0x94 ~ARD013~ #8  // SUPPLANTERA TOUT AUTRE NOM DE SCRIPT HYPOTHÉTIQUEMENT PRÉSENT.
  BUT_ONLY

  EXTEND_TOP ~ARD013.bcs~ ~El[r]in_Dragosh/Scripts/[EL]D013.BAF~ // CRÉERA UN NOUVEAU BCS S'IL N'Y EN A PAS DÉJÀ UN ET SINON AJOUTERA TON SCRIPT EN HAUT DE CELUI EXISTANT. 
  //(OU EN BAS AVEC EXTEND_BOTTOM SI TU PRÉFÈRES).
  

LPF 
fj_are_structure 
INT_VAR 
fj_loc_x = 2482 
fj_loc_y = 595 
fj_orientation = 0 
STR_VAR 
fj_structure_type = actor
fj_name ="Crane" 
fj_cre_resref ="C[R]ANE2" 
fj_dlg_resref ="C[R]ANE2"
END
Bonjour JohnBob,

Merci pour ton message, en plus des erreurs que tu as pointé, il manquait ~~ au niveau des resref.

la ligne flag correspond aux flags que tu souhaites activer // Visible, blend colours, not covered by wall, don't remove in combat.
Modifié en dernier par Faust le dim. 14 avr. 2024, 15:44, modifié 1 fois.
JohnBob
d'Oghmatique
Ogre mage
Messages : 1304
Enregistré le : mar. 28 sept. 2021, 19:52
Localisation : France
Contact :
Statut : Hors ligne
.

Message par JohnBob »

Faust a écrit : dim. 14 avr. 2024, 15:43 la ligne flag correspond aux flags que tu souhaites activer // Visible, blend colours, not covered by wall, don't remove in combat.
Ok, il y a aussi cette méthode pour ajouter les flags pour une animation.

fj_flags = BIT6 | BIT8 | BIT12 | BIT13 // (Au pif dans ce cas, chaque flag est associé à un numéro, les valeurs sont affichées dans NI quand tu accèdes aux flags de l'animation dans le fichier ARE)
Faust a écrit : dim. 14 avr. 2024, 15:43 Merci pour ton message, en plus des erreurs que tu as pointé, il manquait ~~ au niveau des resref.
Bien vu, j’espère que cela a permis l'installation du block.
Modifié en dernier par JohnBob le dim. 14 avr. 2024, 16:38, modifié 2 fois.
Avatar du membre
Faust
Adepte de Grondemarteau
Loup noir
Messages : 291
Enregistré le : mer. 15 avr. 2009, 12:04
Localisation : Wherever I may roam
Statut : Hors ligne
.

Message par Faust »

Oui ça m'a permis de l'installer.

Merci pour ta réponse, je cherchais justement le code pour les flags.
Modifié en dernier par Faust le dim. 14 avr. 2024, 18:37, modifié 2 fois.
Répondre

Retourner vers « Programmation WeiDU »

Qui est en ligne

Utilisateurs parcourant ce forum : Aucun utilisateur enregistré et 1 invité