
Recherche avancée
Médias (21)
-
1,000,000
27 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Demon Seed
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
The Four of Us are Dying
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (43)
-
Soumettre améliorations et plugins supplémentaires
10 avril 2011Si vous avez développé une nouvelle extension permettant d’ajouter une ou plusieurs fonctionnalités utiles à MediaSPIP, faites le nous savoir et son intégration dans la distribution officielle sera envisagée.
Vous pouvez utiliser la liste de discussion de développement afin de le faire savoir ou demander de l’aide quant à la réalisation de ce plugin. MediaSPIP étant basé sur SPIP, il est également possible d’utiliser le liste de discussion SPIP-zone de SPIP pour (...) -
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (6428)
-
Approaches To Modifying Game Resource Files
16 août 2016, par Multimedia Mike — Game HackingI have been assisting The Translator in the translation of another mid-1990s adventure game. This one isn’t quite as multimedia-heavy as the last title, and the challenges are a bit different. I wanted to compose this post in order to describe my thought process and mental model in approaching this problem. Hopefully, this will help some others understand my approach since what I’m doing here often appears as magic to some of my correspondents.
High Level Model
At the highest level, it is valuable to understand the code and the data at play. The code is the game’s engine and the data refers to the collection of resources that comprise the game’s graphics, sound, text, and other assets.
Simplistic high-level game engine model
Ideally, we want to change the data in such a way that the original game engine adopts it as its own because it has the same format as the original data. It is very undesirable to have to modify the binary engine executable in any way.
Modifying The Game Data Directly
How to modify the data ? If we modify the text strings for the sake of language translation, one approach might be to search for strings within the game data files and change them directly. This model assumes that the text strings are stored in a plain, uncompressed format. Some games might store these strings in a text format which can be easily edited with any text editor. Other games will store them as binary data.
In the latter situation, a game hacker can scan through data files with utilities like Unix ‘strings’ to find the resources with the desired strings. Then, use a hex editor to edit the strings directly. For example, change “Original String”…
0098F800 00 00 00 00 00 00 00 4F 72 69 67 69 6E 61 6C 20 .......Original 0098F810 53 74 72 69 6E 67 00 00 00 00 00 00 00 00 00 00 String..........
…to “Short String” and pad the difference in string lengths using spaces (0x20) :
0098F800 00 00 00 00 00 00 00 53 68 6F 72 74 20 53 74 72 .......Short Str 0098F810 69 6E 67 20 20 20 00 00 00 00 00 00 00 00 00 00 ing ..........
This has some obvious problems. First, translated strings need to be of equal our smaller length compared to the original. What if we want to encode “Much Longer String” ?
0098F800 00 00 00 00 00 00 00 4D 75 63 68 20 4C 6F 6E 67 .......Much Long 0098F810 65 72 20 53 74 72 00 00 00 00 00 00 00 00 00 00 er Str..........
It won’t fit. The second problem pertains to character set limitations. If the font in use was only designed for ASCII, it’s going to be inadequate for expressing nearly any other language.
So a better approach is needed.
Understanding The Data Structures
An alternative to the approach outlined above is to understand the game’s resources so they can be modified at a deeper level. Here’s a model to motivate this investigation :
Model of the game resource archive format
This is a very common layout for such formats : there is a file header, a sequence of resource blocks, and a trailing index which describes the locations and types of the foregoing blocks.
What use is understanding the data structures ? In doing so, it becomes possible to write new utilities that disassemble the data into individual pieces, modify the necessary pieces, and then reassemble them into a form that the original game engine likes.
It’s important to take a careful, experimental approach to this since mistakes can be ruthlessly difficult to debug (unless you relish the thought of debugging the control flow through an opaque DOS executable). Thus, the very first goal in all of this is to create a program that can disassemble and reassemble the resource, thus creating an identical resource file. This diagram illustrates this complex initial process :
Rewriting the game resource file
So, yeah, this is one of the most complicated “copy file” operations that I can possibly code. But it forms an important basis, since the next step is to carefully replace one piece at a time.
Modifying a specific game resource
This diagram shows a simplistic model of a resource block that contains a series of message strings. The header contains pointers to each of the strings within the block. Instead of copying this particular resource block directly to the new file, a proposed modification utility will intercept it and rewrite the entire thing, writing new strings of arbitrary length and creating an adjusted header which will correctly point to the start of each new string. Thus, translated strings can be longer than the original strings.
Further Work
Exploiting this same approach, we can intercept and modify other game resources including fonts, images, and anything else that might need to be translated. I will explore specific examples in a later blog post.Followup
- Translating Return to Ringworld, in which I apply the ideas expressed in this post.
-
Anomalie #3035 (Nouveau) : Association de mots-clés et autorisation
6 août 2013, par Joseph LarmarangeCréation d’un ticket suite à http://permalink.gmane.org/gmane.comp.web.spip.devel/64550
Cas de figure :
- des groupes de mots-clés pour lesquels les rédacteurs ont les droits pour ajouter un mot clé de ces groupes.
- un rédacteur qui visualise un article dont il n’est pas l’auteur et par conséquent pour lequel il n’a pas les droits d’ajouter ou de supprimer un mot-clé.Néanmoins, ce rédacteur va voir la liste des mots-clés associés à cet article, avec un lien pour supprimer les mots-clés en question, un lien ’Ajouter des mots-clés’ lui permettant de charger le formulaire d’ajout de mot-clé.
Si ce rédacteur décide de faire l’une de ces actions (ajout ou suppression), le bloc va se recharger, l’action ne sera pas exécutée et il n’y aura aucun message d’erreur, par exemple pour avertir que l’on n’a pas les droits nécessaires. On a donc une incohérence de l’interface.
En investigant, j’aperçois plusieurs points qui font défaut.
En premier lieu, la fonction autoriser_associermots_dist() regarde simplement si un auteur à le droit en général d’associer des mots-clés d’un groupe en fonction de son statut (admin ou rédacteur) mais ne prends pas en compte si l’individu a le droit de modifier l’objet en question.
Le formulaire EDITER_LIENS du core regarde dans sa fonction charger l’autorisation associerobjets (donc associermots dans notre cas de figure) pour savoir si le formulaire est editable ou non. Dans sa fonction traiter, le formulaire regarde simplement si l’individu a le droit de modifier l’objet en question ou non (mais ne revérifie pas qu’il a les droits d’associer l’objet en question). Par ailleurs, si on n’a pas les droits requis, la fonction traiter ne renvoie pas de message d’erreur.
Le squelette prive/objets/liste/mots_lies.html ne tient compte ni de #ENVeditable ni d’une quelconque autorisation pour afficher ou non un lien de suppression d’un mot-clé.
La fonction autoriser_groupemots_afficherselecteurmots_dist renvoie toujours true.
Propositions d’évolution
- Faire évoluer l’autorisation associermots pour qu’elle vérifie également, si un $id_objet est passé, que l’invidu a les droits de modifier l’objet en question. Cela permettra que la propriété editable soit correctement renseignée dans le formulaire d’ajout de mot-clé. Par ailleurs, pour les plugins ayant besoin de savoir si quelqu’un a le droit d’associer un mot-clé, cela fera une seule auorisation à vérifier (le problème s’est posé avec coche_mots).
- La fonction traiter de éditer_liens devrait dépendre de associermot (il faut vérifier que cela n’a pas d’incidence pour les autres tables de liens) et non des droits de modification d’un objet. Ces droits peuvent être différents dans un contexte d’autorisations personnalisées.
- Cette même fonction traiter doit renvoyer un message d’erreur si on n’a pas les droits suffisants.
- Le squelette prive/objets/liste/mots_lies.html doit vérifier l’autorisation associermots pour afficher un lien de suppression d’un mot-clé.
- Par cohérence, la fonction autoriser_groupemots_afficherselecteurmots_dist est modifiée pour renvoyer, par défaut, le résultat de l’autorisation associermots.
-
windows : Flag debug builds in the resource file
6 février 2016, par Henrik Gramner