Scripts / List the IDs/Names of entities through an Excel macro

Author
Message
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 8th Oct 2014 23:07 Edited at: 10th Oct 2014 16:20
Working on a demo I thought it would be interesting and useful to list the ids of all the entities used in the game that we are working, and be able to save it with a relevant name, to use this information later.



Well, I've written an Excel macro that generates the name and id of each entity used in a map.

Reloaded entities listed entites in the order they are loaded on the map, and sometimes we need the id number of an entity for use in a script later.

As all you knows, a macro is useful to automate tasks in Excel.



It is a necessary requirement to have Microsoft Excel installed on your computer in order to use this macro.



Alternatively you can download Excel Viewer as you can Open, view, and print Excel workbooks, even if you don't have Excel installed.



http://www.microsoft.com/en-us/download/details.aspx?id=10



In principle it should work on a version of Excel 2003 or later.



Instructions.



a- Open this Excel workbook.

b- Possibly you must allow the use of macros in excel.

For those who do not know how, here is better explained.



http://office.microsoft.com/en-us/excel-help/run-a-macro-HP010342865.aspx



Note also explains how you create a button on the ribbon or in the Quick Access Toolbar, to run the macro with a simple mouse click.

Also explains how to do, if the Developer tab is not available on your excel.This is useful to see/modify the macro in VBA (Visual Basic for Applications).



If you prefer, just click on picture in worksheet.



C- Assuming you've a button created to run the macro, you has to follow those steps...



1- Run Reloaded and your map.

If you are working on an empty map, Reloaded assigns an object number (id) for each entity / character, even the player, and generates a log file called "FPSC-MapEditor.log", that contains relevant information about the map, including the name and number of id , which is the information we need and we can extract directly from this file, but I thought that automate this task with a macro, might be more comfortable for you, and for me, of course; Especially if you are working on several maps, or a very large map with a lot of entities, characters, etc.



2- Since Reloaded do not support very well that you work / modify your files while running (at least for me), maybe it's a good idea to close Reloaded, before creating the Workbook.

3- Open this workbook (if closed).

4- Run the macro.



When you run the macro.



The macro will open a FileDialog that allows you to search the log file that you want to work. Locate the log file called "FPSC-MapEditor.log" and click on OK.

The macro will create the Excel workbook based on the information contained in the log file.

Then it will open a file SaveDialog for you to save the workbook in the place you want. I suggest that you use a name related to the map or game, this will facilitate its location.



Well, I hope Google has expressed correctly.

If you believe that this can help and have any comments or suggestions, please do not hesitate to post here.



Enjoy this simple macro.



Edit: Add download link (Excel Viewer).



3com

Attachments

Login to view attachments
PM
Jerry Tremble
GameGuru TGC Backer
11
Years of Service
User Offline
Joined: 5th Nov 2012
Location: Sonoran Desert
Posted: 9th Oct 2014 02:35
Looks very useful! Unfortunately for me I've been using Open Office and/or Libre Office for a very, very long time! The only version of Excel I have is in Office 2000. I could try it, I guess, but had no plans on installing it. Not even sure it would still run in Win 8.1. Thanks for the info on that log file, though, I never really paid much attention to those. There's a lot of info in there!

MAME Cab PC: i7 4770@3.4Ghz (passmark 9945), 12GB RAM, Win 8.1/64, GeForce GTX645 (passmark 1898); Shiny new laptop: i7 4800MQ@2.7Ghz (passmark 8586), 16GB RAM, Win 8.1/64, GeForce GTX870M (passmark 3598); Old laptop: i5@2.3Ghz, 8GB RAM, Win 7/64, Intel 3000 graphics
PM
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 10th Oct 2014 16:22
@ Jerry Tremble
Alternatively you can download Excel Viewer as you can Open, view, and print Excel workbooks, even if you don't have Excel installed.
Added link in the first post above.

3com
PM

Login to post a reply

Server time is: 2024-04-26 15:03:56
Your offset time is: 2024-04-26 15:03:56