Third Party Tools / FPI to LUA converter - version 1.0

Author
Message
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 12th Sep 2017 17:13 Edited at: 12th Sep 2017 17:14
If anyone wants to get their FPSC level lifts working in GameGuru, give me a shout and if there is enough interest I'll make a vid. Some various ways to achieve this and have also used the GG LUA commands "INTERSECTALL", "GetIntersectCollisionX()", "GetIntersectCollisionY()" and "GetIntersectCollisionZ()" to help with the same goal.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 13th Sep 2017 09:39
So now I've been toying around with the GG raycasting lua commands, the next release will have alternative functions to RAYCASTUP etc and also replacement functions for ASSOCIATEPLAYER and UNASSOCIATEPLAYER. All very simple. Been playing around with various other commands such as the fog commands and mouse capabilities in GG. Lots of testing and retesting of commands/functions in GG as I want to get this right.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
MK83
GameGuru TGC Backer
17
Years of Service
User Offline
Joined: 10th Jun 2006
Location: Greeneville, TN USA
Posted: 13th Sep 2017 14:48
Quote: "If anyone wants to get their FPSC level lifts working in GameGuru, give me a shout and if there is enough interest I'll make a vid. "
Meeeeeeeeeeeeeeeeeeeeeee! lol.
AMD Phenom x4 9850 2.70 Ghz , 6 Gb ram, 2GB EVGA Geforce GTX 750, Win 10 x64



PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 14th Sep 2017 10:10
@MK83-ok that's great, will wait to see if there any more interest from others....
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 14th Sep 2017 10:12
If animations start at 1 in fpsc and 0 in GG shouldn't it go the other way?
So animate1 becomes setanimation(0) (not 2)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 14th Sep 2017 10:39 Edited at: 15th Sep 2017 16:07
@smallg-ummmm so do you mean if:

in fpsc FPE:

anim1=0,100

then in GG FPE:

anim0=0,100


?

if so, interesting as I've had scenarios where in the FPSC FPE, the slots go like this:

anim0=0,0
anim1=0,100

in GG when testing animations for anim1, setting SETANIMATION(e,1) didn't work, but setting SETANIMATION(e,2) did work (e.g. a fan, door and security cameras etc).

Let me know if I've misunderstood. In the meantime, I'll update my program to handle the anim slots intelligently

[update-ok seems like there is something odd going on with anim slots in GG, looking into it]
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
Bugsy
15
Years of Service
User Offline
Joined: 24th Nov 2008
Location: Savannah
Posted: 15th Sep 2017 05:25
with these animation commands, would scripts like these become translatable and work on custom characters?





Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 15th Sep 2017 06:40
@Bugsy-Yes the commands in the above snippets have already been translated in the converter and work fine in GG.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
granada
Forum Support
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 15th Sep 2017 12:09
Very cool mike ,looking better all the time.

Dave
Windows 10 Pro
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 15th Sep 2017 12:29 Edited at: 15th Sep 2017 19:15
thanks Dave

@Bugsy- ok I converted your first script using the current version of the tool but had to make some manual mods due to differences maybe in FPSC FPI logic to get the script to work with GameGuru e.g. I used a door here with 31 frames:

Your FPI logic:


Converted LUA code+manual mod (corrected version):
My program will be updated to reflect all these changes as it's still WIP.


Also, here's a quick vid showing the script in Action with the door (Kasseyus). I am currently in the process of double checking my interpretation of the FPSC FPI docs and FPSC source code to make sure the commands are doing what they should. The animation commands are being looked into again as I'm not 100% sure it's quite right yet but getting there. Should be all fixed by the next release (at least for the animation side).


Actually, corrected video with the corrected LUA script will be placed here shortly:

Part 1 (last bit got cut off so added Part 2 below):


Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 15th Sep 2017 17:36 Edited at: 15th Sep 2017 17:37
some bizarre things were happening with animX slots in GG. Now seems ok. So Anim0 is slot 0 and Anim1 is slot 1. The security camera only seemed to work when setting the current anim slot to 2, but now this only seems to work with Anim slot 1. slot 0 is a "do nothing" animation slot. How confusing.

Anyway, written an entity tracker program in LUA so I can track all entities (dynamic) names, XYZ, all in 1 global script which scans any dynamic entity script that has reference to my own global (dare I say it) table/list/array in it ha . I can then use this for debug and other useful stuff.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT

Attachments

Login to view attachments
OldFlak
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 27th Jan 2015
Location: Tasmania Australia
Posted: 16th Sep 2017 04:42
Errrrmmm, why yes I need a lift

A vid on doing that would be awesome BOR!



Reliquia....
aka OldFlak
Intel(R) Core(TM) i3-4160 @ 3,60GHz. 8GB Ram. NVidia GeForce GTX 750. Acer 24" Monitors x 2 @ 1920 x 1080. Windows 10 Pro 64-bit.
PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 16th Sep 2017 05:46
@Reliquia-that's great, I started doing a vid last night but messed up a few times and editing stuff in the GG editor was getting cumbersome due to my recording software (the windows one isn't compatible with my PC). Will do one today hopefully.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 16th Sep 2017 05:56
realised that for the anim slots code to be improved, It would be impossible to determine what FPE will be used with the converted FPI to LUA script. So will have to default to the FPSC default slots that are specified in the original scripts (and any adjustments needed for GG will have to be done manually-what a pain). Although these should now be the same (in most cases) after some strangeness going on previously with the GameGuru Anim slots. No idea what happened there.

My main goal is at least to have all (or most of) the FPSC default commands (both condition and action) working in GG. A lot of the commands are just functions returning a calculated value, so a lot of them can be done using LUA function replacements. Enjoying the process of converting the FPSC commands and the FPSC source code is pretty easy to go through. I guess time will tell what can and can't be done.

Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 16th Sep 2017 18:37
FPSC lift video is coming soon....had some technical hitches (and YT is playing up) and got side tracked with other commitments.....
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 17th Sep 2017 08:05 Edited at: 22nd Mar 2018 23:55
Here is the FPSC Lift FPI->LUA video using my version of the FPSC RAYCASTUP command:



will attach the scripts a bit later as I'm in the process of tidying them up


[update-Here are the 2 lift scripts converted from FPI to LUA. My test scifi level now has all 4 workable doors.....next put in the windows....this is easy enough as the SegAutoWelder tool exports the LUA scripts that position all dynamic entities based on the level positioning......once the entities are positioned the scripts get changed over to the workable scripts.....with the windows I'm going to test out my old glass breaking scripts....will probably need to update them and modify stuff to get it to work in the current version of GG....If I have any luck with the glass breaking windows, I'll post some pics/vid]
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT

Attachments

Login to view attachments
OldFlak
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 27th Jan 2015
Location: Tasmania Australia
Posted: 17th Sep 2017 10:10
Hey BOR thanks for your work and sharing your expertise.

Been a long day out of the office with family, and just about ready for some shuteye, so I'll watch the vid in the morning. Looking forward to that.

Reliquia....
aka OldFlak
Intel(R) Core(TM) i3-4160 @ 3,60GHz. 8GB Ram. NVidia GeForce GTX 750. Acer 24" Monitors x 2 @ 1920 x 1080. Windows 10 Pro 64-bit.
PM
granada
Forum Support
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 17th Sep 2017 18:51
Looks great this is something i will need later,thanks Mike.

Dave
Windows 10 Pro
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
MK83
GameGuru TGC Backer
17
Years of Service
User Offline
Joined: 10th Jun 2006
Location: Greeneville, TN USA
Posted: 17th Sep 2017 23:28
Quote: "[update-Here are the 2 lift scripts converted from FPI to LUA"
Awesome, thank you.
AMD Phenom x4 9850 2.70 Ghz , 6 Gb ram, 2GB EVGA Geforce GTX 750, Win 10 x64



PM
Bugsy
15
Years of Service
User Offline
Joined: 24th Nov 2008
Location: Savannah
Posted: 18th Sep 2017 01:14
I am amazed, so, with this tool, I could essentially write simple scripts for characters with FPI and convert to lua with no changes to the code required?
can I add you on skype? or discord? I would love to send you other stuff to test with this like characters.
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 18th Sep 2017 05:05
thanks guys, a lot more work to do on this. The conversion process is coming on quite nicely ,thae hardest part is testing it and getting the logic to be compatible and working correctly in GameGuru. Some weird quirkiness such as the collision side of things, but it'll hopefully be worth it.

@Bugsy-yes essentially, the goal is to get the program to convert FPI to lua with no changes to the code. At the moment, some minor updates are having to be applied but in the end these issues will all get sorted out. So some basic character FPI scripting should be converted ok. Still a lot to do with the converting of FPI commands especially more complex AI. But that will come. What I really want (and I asked Lee), is to be able to control character FX (shader) variables and apply them to the characters. But Lee has said this is not yet possible. So am still hoping a lot of GameGuru Lua commands get added somewhere down the line to be able to do that plus more. I'll PM you my Skype/email address. No idea what discord is but am assuming it's something similar to skype. Please feel free to send me any test scripts, although I have a lot of the default/custom FPI from other model packs etc.

Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 18th Sep 2017 08:47
loads more fun this morning with converting and testing FPSC legacy RAYCAST commands. All 3 commands RAYCAST, RAYCASTBACK and RAYCASTUP converted to LUA equivalent functions and tested some scenarios out in GameGuru using my entity tracker lua code. I used a crate/barrel surrounded by 4 doors and modified the ray values to see if the entity got hit from the back and front (up rays already tested in the lift examples and work fine).
So these seem to work fine, but will do a little more testing. Would like to find some FPSC scripts/entities that use these commands i.e. RAYCASTBACK and RAYCAST. Hopefully I will have a handful somewhere installed in FPSC scriptbank.

Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT

Attachments

Login to view attachments
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 18th Sep 2017 16:11
Glass breaking effect is also back. Needed a little tweaking with the current GameGuru. I want to experiment again with rigid bodies in Blender and also have a look at using cloth as an alternative (ummmm).

Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
granada
Forum Support
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 18th Sep 2017 20:09
That's great,you're realy racing along with this .

Dave
Windows 10 Pro
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 19th Sep 2017 06:52 Edited at: 19th Sep 2017 07:15
A quote from Lee's internal beta update blog:

Quote: " I was also interested in being able to see my PBR layers at any time during this work, so I killed two birds with one stone and added a new LUA command called SetShaderVariable which will allow anyone to change the shader constants of any in-game shader, which has been requested by the scripting elite of the community, and which saved me the task of adding any hard coding into the mix. I added the controls to view the PBR layers in the gameplayercontrol.lua script, and used a nice generic name like ShaderVariables as my constant, and by passing a shader index value of zero into the command it will seek out ALL shaders loaded and modify the above constant, which in my case finds and adjusts all PBR shaders with a request to show me a specific PBR layer."


YESSSS, so happy

So today , I will add in the FPSC SHADER related commands. RAYCAST commands/functions now added to the program as well as the ASSOCIATEPLAYER/UNASSOCIATEPLAYER functions.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 19th Sep 2017 12:23 Edited at: 19th Sep 2017 13:00
[edit-was posted in wrong thread]
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 22nd Sep 2017 08:22 Edited at: 22nd Sep 2017 08:24
Quite a lot done in the last couple of days.

Program now:

splits condition test values (if more than 1) and handles appropriately e.g. framebeyond=23 15
Checks if any custom functions need to be appended to end of LUA script if a command not converted but has an alternative function
Replaces "\" within referenced filenames with "\\" e.g. SwitchScript(e,"rolfy\\demons\\altscript\\staygrounded.fpi")

plus other fixes, changes to internal interpreter code.....

Playing around with LUA global sounds etc and these seem to work now, no idea what I did wrong before.... but these LoadGlobalSound, PlayGlobalSound,DeleteGlobalSound etc work ok. Although not a big fan of loading in sounds in realtime during gameplay.
The FPI SOUND command can be either a numeric value or filename. So deciding whether to use LoadGlobalSound in conjunction with PlayGlobalSound for the filename and just PlaySound (numeric values) for sounds that can be inserted within the editor for an entity. Ummmmm

Want to implement the GLOBALVAR/SETVAR type commands....keep meaning to and keep putting it off (even though I have written and tested code e.g. the 5 zombie video) as well as adding code to group all the HUD type FPI commands and output correctly to a specific sprite command e.g. HUDX=50, HUDY=90 would be placed inside SetSpritePosition(spr,X,Y). HUD RESET just resets all the values for a given HUD or sprite. Not sure HUDRESET LUA equivalent is really needed, but you never know.

Tons of other stuff being looked into including inventory commands such as CANTAKE, PLAYERTAKE.

No screenshots today but will see how things progress in the next few days,weeks.

have a good day.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
MK83
GameGuru TGC Backer
17
Years of Service
User Offline
Joined: 10th Jun 2006
Location: Greeneville, TN USA
Posted: 22nd Sep 2017 16:44
Awesome!
AMD Phenom x4 9850 2.70 Ghz , 6 Gb ram, 2GB EVGA Geforce GTX 750, Win 10 x64



PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 25th Sep 2017 09:43 Edited at: 25th Sep 2017 09:49
thanks MK83-

So busy weekend with family and other stuff but managed to convert the "tf341_anim_viewer" FPI program for the T341 models in FPSC classic and made some small adjustments to get it working with LUA.

Updated the program to also include the original "DESC" FPI description+some other small fixes/improvements.
If you want to use the code below, you will need to make sure you have the sound file installed or swap it with another one of your choice. It's just a click sound.

Changed the FPGC-- commands to use the TEXT LUA command at the moment.



If you want to compare against the original FPI, here it is below:

Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 28th Sep 2017 07:47 Edited at: 28th Sep 2017 08:01
Busy last few days and the implemented GLOBALVAR, SETVAR and VAREQUAL commands now seem to work quite nicely and tested the converter tool using the Kasseyus "killcountdoor.fpi" again to make sure and attached a modified zombie scripts (which add 1 when killed to the global variable) to all 5 zombies (do these zombies actually ever move ha ). Anyway, tested out on various doors and they all open once 5 zombies have been killed. All works straight from initial conversion without any modifications needed. See pics.

For the GLOBALVAR , as in FPSC, you have 0-99 global variables to use (you can have as many as you want in LUA). you can set these to any name/value you want, to hold any gameplay information you want.

other commands being looked at are :

FPGCRAWTEXT (just using the LUA "Text" command currently.
FPGCRAWTEXTSIZE
FPGCRAWTEXTFONT
FPGCRAWTEXTX
FPGCRAWTEXTY

All the HUD commands. These will be looked at as a whole and converted accordingly.

DIMLOCALVAR
DIMVAR
ADDVAR. Is just a simple function.
SUBVAR. Is just a simple function.
PLRSOUND. LoadGlobalSound, PlayGlobalSound etc. These work well.
PLAYERTAKE
CANTAKE
ANYFURTHER
ANYWITHIN
(most of the distance checking type commands)

the one I would really like to do is TALK and get the mouth phonetics working, zones and AI.

Some of this stuff is fairly simple, others a little more complicated.

More to come soon hopefully.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT

Attachments

Login to view attachments
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 29th Sep 2017 19:53 Edited at: 30th Sep 2017 06:47
Apart from lifts, here is a demo showing what's been achieved so far with the converter program. Actually, I mention that the spine03 limb index is 61, but I meant the head limb index is 61 and spine03 is 28. Too much coffee during the day I think

Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
granada
Forum Support
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 29th Sep 2017 23:22
Tried a couple of times,still saying video unavailable .

Dave
Windows 10 Pro
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 30th Sep 2017 06:44
@Granada-sorry about that, having issues with YT. Will correct soon as possible.

Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 30th Sep 2017 06:48
a duplicate video now deleted and edited the link, so video now working again. Phew
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 2nd Oct 2017 19:56
Great progress on this BOTR, you are a credit to the forum thank you so much for all the time and effort you are putting into these tools
Welcome to the real world!
Windows 10 Pro x64 - Core i7-7700K @4.2GHz - 32GB DDR4 RAM - GeForce GTX 1060-6G 6GB - 1TB NVe SSD
MK83
GameGuru TGC Backer
17
Years of Service
User Offline
Joined: 10th Jun 2006
Location: Greeneville, TN USA
Posted: 3rd Oct 2017 00:06
Quote: "Great progress on this BOTR, you are a credit to the forum thank you so much for all the time and effort you are putting into these tools "
Yea! What he said!!!
AMD Phenom x4 9850 2.70 Ghz , 6 Gb ram, 2GB EVGA Geforce GTX 750, Win 10 x64



PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 3rd Oct 2017 08:14
thanks a lot guys.

Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 10th Oct 2017 07:42
changed the way "state" variable get initialised. This variable is now converted to an array (or table/list), so more than 1 entity can use the same script e.g. a lift or a door. See code snippet below for example. Still working on the program and will add the GUI soon as I want to be able to view the conversion in realtime and make any edits/modifications in realtime as well as test out in real time while in the converter (GG fired up and LUA script tested out). There will most likely be some user options for more control and flexibility.

Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
MK83
GameGuru TGC Backer
17
Years of Service
User Offline
Joined: 10th Jun 2006
Location: Greeneville, TN USA
Posted: 10th Oct 2017 23:08
Awesome
AMD Phenom x4 9850 2.70 Ghz , 6 Gb ram, 2GB EVGA Geforce GTX 750, Win 10 x64



PM
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 11th Oct 2017 05:46
Great stuff as always.
Thank you.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 14th Oct 2017 09:01 Edited at: 14th Oct 2017 10:19
thanks again guys for your kind words.

Working on waypoints at the moment. As you know with FPSC classic there is the conditional command WAYPOINTSTATE and several action commands :
WAYPOINTSTART instructs the entity to find the closest waypoint
WAYPOINTSTOP stops the entity following waypoints
WAYPOINTREVERSE makes the entity reverse course and go the other way
WAYPOINTNEXT instructs the entity to find the next waypoint
WAYPOINTPREV instructs the entity to find the previous waypoint
WAYPOINTRANDOM i

So for the WAYPOINTSTATE command, this will be an array (or list or table ) set to "NOT STARTED" for all entities which was originally 0 in the FPSC FPI :



and then with the actions commands these will be within custom functions which will (hopefully) instruct the entity to do something such as select a random waypoint.

the FPI script I'm using as a basis is from the fantasypack and I've selected the FPI for the zombie character. At the moment the zombie doesn't do too much but does animate and some of the "state" values are changing. So , all going well, I should get this zombie to follow waypoints and make choices as per the original FPI script. Let's see how it goes......

[update-zombie below looks dreadful in GG as you can see the terrain through him and sinks into the terrain[even with a floor zone placed], but it's just a test for now...maybe will look at the model and textures later, but pic shows zombie currently searching for the nearest waypoint and the walking animation loops ok.....maybe I should point him to the nearest health centre ...he looks terrible ]
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT

Attachments

Login to view attachments
granada
Forum Support
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 14th Oct 2017 15:08
Quote: "maybe I should point him to the nearest health centre ...he looks terrible"


I thought that was normal,i always look like that on a monday morning . Nice to see your on the right path with this,hope it all works out.

Dave
Windows 10 Pro
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 16th Oct 2017 08:33
@Dave - ha , same here...can't believe it's Monday morning already.

Only 2 weeks and 2 days to go and then my current contract comes to a natural end. After that I will have a break and power through a load of programming stuff I want to get done.




Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
FPSC to GameGuru Tools: AutoWelder/SegAutoWelder, Entity+Weapon Welder, FPEtoBAT
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 16th Nov 2019 08:37
decided to re-open this thread as I would like to continue with the FPI->LUA converter, I was doing quite well. Life got in the way.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 16th Nov 2019 10:12
@ BOTR
Quote: "having issues with YT"

Ignore if relate with, but now you has to setup your channel/videos as material for kids or not for kids, because the new EE.UU law for protect the childrens.

Good job mate as usual, about getting what's fpe work with what's fpi/lua code, can you use entity path to identify the entity and create the needed script at runtime as I did in my "updating global vars" thread?
Or maybe I missunderstood everything and you are just talking about your internal c++ code?
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 16th Nov 2019 10:49
@3com - oh no totally unrelated to the EU law re: children protection, was just technical issues at the time.
Sorry , I'm not sure I understood your question, it's been a while since this thread was active so I'm a bit lost myself until I get to refresh my memory on what I did at the time.

Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 17th Nov 2019 14:00
@ BOTR
Quote: " It would be impossible to determine what FPE will be used with the converted FPI to LUA script."

Let's see if I've got your point correctly:
Firts at all, not really familiar with fpi script system, since when I've started with fpsc quiky appears reloaded ,and after comes GG.
In GG 1 script is attached to an entity to get these entity alive, I guess in fpsc is the same, so just using the LUA command to get the entity path you can get the corresponding fpe file path, and so, you already get which fpe work with that script. I asume this is for work with fpsc classic entities.
Repeat, or I missunderstood something here?

I have not use this tool yet, since I'm no interested about using classic entities in my games, anyway I do love all related with code world.

Quote: "and create the needed script at runtime as I did in my "updating global vars" thread?"

Source

Quote: "it's been a while since this thread was active so I'm a bit lost myself until I get to refresh my memory on what I did at the time."

I know that feeling, specially like you having many projects at time, this mean a ton of codelines.

Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 19th Nov 2019 10:22
I've started to revisit the conversion program mainly for my own goals/challenges to see if it can be done. Previously I managed to get lifts working, implement global variables and various other stuff. Have to refresh my memory a bit on what I did, but after someone asked for the kill5zombiestoopendoor video / scripts again, I had a look at this and it's starting to come back to me now. Of course you don't have to use this converion tool at all, just delve into the world of LUA. So will start having a look at more commands in FPI and see what's worth converting next.
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, C#, VB, SQL, PL-SQL, JavaScript, HTML, Three.js, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; 12GB.
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 6th Dec 2019 15:50
Nice, this is interesting. Hadn't seen this thread before. Accessing the classic
models would be super seeing what must be many long days and months of
work for someone to create them. One of the issues for the classics is the
glowing [textures] effect, would your project entail that --
is that a cause of the .fpi setting?
PM
benjiboy
7
Years of Service
User Offline
Joined: 24th Mar 2017
Location: In the depths of rural Norfolk
Posted: 18th Feb 2020 14:40 Edited at: 18th Feb 2020 14:42
@GubbyBlips. I posted a thread with a complete set of updated classics models to fix the brightness thing.

https://forum.game-guru.com/thread/221080
You can't teach an old dog.

Login to post a reply

Server time is: 2024-04-24 05:26:06
Your offset time is: 2024-04-24 05:26:06