Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Sun Apr 28, 2024 2:47 am
All times are UTC + 0
New Locomotor
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 2 [63 Posts] Mark the topic unread ::  View previous topic :: View next topic
Goto page: 1, 2 Next
Author Message
VK
Pyro Sniper


Joined: 28 Jul 2005
Location: in GAMEMD.EXE

PostPosted: Tue Jul 03, 2007 9:14 pm    Post subject:  New Locomotor
Subject description: download and try
Reply with quote  Mark this post and the followings unread

New locomotion type

Westwood had planned to make TS engine very upgradeable.
For unknown reasons, they didn't implement all Sad

Test my new locomotion type for TS now!

1) Download NewLocomotor.zip.
2) Extract files from ZIP archive to good folder (you can use TS folder).
3) Run Reg.bat (On Windows Vista you must start it from administrator name)
4) Open your Rules.INI file
5) Change Locomotor= tag on some unit.

example:
Code:

[SMECH]
...
Locomotor={0C2F47D2-34F5-445a-A38A-D66C70329646}
...

6) Run TS, see effects in game Very Happy

Please remember, that this is only example Smile
This locomotion totally written on C++ language,
although it contains some version-based-code, because Westwood didn't implement all features.
(In other words, I have special layer, which is using code written on assembler)

This locomotion don't work with RA2/YR. It only works with TS 2.03.
Don't move dll file. If you forget to register dll file or move it, you will have IE, when unit will be created.


In other words, it's rather possible to write your own locomotors using high-level programming language!
(such as C, C++, VB, Delphi)
The programming language must support COM and DLL.

However here exist some problems, which should be researched.

Only for Windows XP or Windows Vista.



NewLocomotion.zip
 Description:

Download
 Filename:  NewLocomotion.zip
 Filesize:  37.63 KB
 Downloaded:  549 Time(s)


_________________
ARM forever - x86 sucks

Last edited by VK on Tue Jul 03, 2007 9:31 pm; edited 1 time in total

Back to top
View user's profile Send private message Skype Account
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Tue Jul 03, 2007 9:26 pm    Post subject: Reply with quote  Mark this post and the followings unread

I makes the unit go around in circles! Good start though.

Last edited by CCHyper on Mon Oct 21, 2019 11:03 pm; edited 1 time in total

Back to top
View user's profile Send private message
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Wed Jul 04, 2007 8:05 am    Post subject: Reply with quote  Mark this post and the followings unread

Okay....that's weird....I'm not sure if there's any point in it, as the unit seems to bounce trough structures and terrain. Good start, though.

_________________


Back to top
View user's profile Send private message
Rico
Tiberian Beast


Joined: 01 Nov 2004
Location: Sydney, Australia

PostPosted: Wed Jul 04, 2007 10:02 am    Post subject: Reply with quote  Mark this post and the followings unread

This means that someone could code TS with a proper flying locomotor Cool

Back to top
View user's profile Send private message Skype Account Yahoo Messenger Account
John Galt
Commander


Joined: 01 Aug 2003
Location: Galt's Gulch

PostPosted: Wed Jul 04, 2007 1:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

VK, it would be very interesting, at least for some people, if you wrote some documentation about coding stuff like this.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Daz
Energy Commando


Joined: 26 Apr 2003

PostPosted: Wed Jul 04, 2007 2:42 pm    Post subject: Reply with quote  Mark this post and the followings unread

Don't have TS installed to test this myself, but if it makes units go round in circles is it possible to make them turn as they move forward rather than stopping and turning when you give them an order?

_________________

Back to top
View user's profile Send private message Visit poster's website
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Wed Jul 04, 2007 3:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

CNCVK said anything to do with moment is possible...

Back to top
View user's profile Send private message
Crimsonum
Seth


Joined: 14 Jul 2005
Location: Fineland

PostPosted: Wed Jul 04, 2007 3:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

Daz wrote:
Don't have TS installed to test this myself, but if it makes units go round in circles is it possible to make them turn as they move forward rather than stopping and turning when you give them an order?


That would be a good feature for all non-tracked units.

_________________


Back to top
View user's profile Send private message
k212
Flamethrower


Joined: 20 May 2006
Location: Spain

PostPosted: Wed Jul 04, 2007 4:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

i say : go for proper flying locomotor, keep it up , btw please post some documentation as i have lots of free time and i know a little of assembler and C++ as well

Back to top
View user's profile Send private message
Dupl3xxx
Commander


Joined: 22 Aug 2006
Location: somewhere south of the north pole

PostPosted: Wed Jul 04, 2007 6:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

This is intresting, in deed! Any SS or movie shpving it? (my TFD + my vista = crap)

_________________
This is a signature

Back to top
View user's profile Send private message Visit poster's website
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Wed Jul 04, 2007 6:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

i could try and make a GIF anim...

Back to top
View user's profile Send private message
VK
Pyro Sniper


Joined: 28 Jul 2005
Location: in GAMEMD.EXE

PostPosted: Wed Jul 04, 2007 8:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

the main part of code:
Code:

    if (m_bMoving)
    {
        // rotate an object
        m_crd.X = m_pos.X + m_radius * sin(m_angle);
        m_crd.Y = m_pos.Y + m_radius * cos(m_angle);
        m_crd.Z = m_pos.Z;
 
        TechnoClass::InterMoveLocker(m_pObject, 0);
        TechnoClass::SetPos(m_pObject, &m_crd);
        TechnoClass::InterMoveLocker(m_pObject, 1);

        // increase an angle
        m_angle += 0.01;
        if (m_angle > 6.2831)
        {
            m_angle = 0;
        }
    }
   return m_bMoving;

_________________
ARM forever - x86 sucks

Back to top
View user's profile Send private message Skype Account
4StarGeneral
General


Joined: 14 Sep 2006
Location: Limbo

PostPosted: Wed Jul 04, 2007 9:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

Ooo...Great work VK! This will help alot to some of us modders who know C. Now it's high time for a proper Fly Locomotor...

_________________
"Don't beg for things; Do it yourself or you'll never get anything."

Back to top
View user's profile Send private message Send e-mail YouTube User URL
Dupl3xxx
Commander


Joined: 22 Aug 2006
Location: somewhere south of the north pole

PostPosted: Wed Jul 04, 2007 9:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

That would be great TSHyper! #Tongue Oh and VK, will you try to add this feature (costom loco's) to ZP? Surprised

_________________
This is a signature

Back to top
View user's profile Send private message Visit poster's website
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Wed Jul 04, 2007 9:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

hmm... it seems the output GIF is about 4 MB :S and this feature does not need ETS or any type of patch... awsome how it works.


*Thanks to Nyerguds for the help Smile

Back to top
View user's profile Send private message
Holy_Master
Commander


Joined: 21 Jul 2004
Location: Thailand

PostPosted: Thu Jul 05, 2007 4:10 am    Post subject: Reply with quote  Mark this post and the followings unread

it's very interesting for TS modder. i hope some one will do Away Fly locomotor for Aircraft (like Starcraft) or all terrain moving soon.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Orca004ky
Vehicle Drone


Joined: 08 Mar 2003
Location: Atlantis

PostPosted: Thu Jul 05, 2007 5:13 am    Post subject: Reply with quote  Mark this post and the followings unread

IF you can use DLLs to make new locomotors, theoretcially, couldnt you use dll files to make anyhitng not already hard coded into the executable?

_________________
DRIZZT DO'URDEN AKA ORCA004ky
SCORPION'S REVENGE MOD LEADER
http://www.cnc-source.com/forums/index.php?showforum=27

Back to top
View user's profile Send private message Send e-mail
DeathRay2K
Commander


Joined: 01 Sep 2002
Location: Canada

PostPosted: Thu Jul 05, 2007 6:38 am    Post subject: Reply with quote  Mark this post and the followings unread

No.

I am, though very interested in a more information regarding the creation of custom locos.

_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
John Galt
Commander


Joined: 01 Aug 2003
Location: Galt's Gulch

PostPosted: Thu Jul 05, 2007 6:48 am    Post subject: Reply with quote  Mark this post and the followings unread

VK, you and I both know that code is useless without the proper headers. Smile

(Theoretically I believe you could use this method for other features that use CLSIDs, however, aside from Locomotors, only the non-implemented AIGenerals use them.)

Back to top
View user's profile Send private message Visit poster's website Skype Account
k212
Flamethrower


Joined: 20 May 2006
Location: Spain

PostPosted: Thu Jul 05, 2007 9:44 am    Post subject: Reply with quote  Mark this post and the followings unread

mmm, looks nice , one thing though ;
why did the air transport locomotor stop working after patch ??
-because they changed it or because they changed some ingame coding

btw,why don't you post the old(working) air transport locomotor so we can all come up with other ways to get the same result

Back to top
View user's profile Send private message
k212
Flamethrower


Joined: 20 May 2006
Location: Spain

PostPosted: Thu Jul 05, 2007 12:31 pm    Post subject: Reply with quote  Mark this post and the followings unread


Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Thu Jul 05, 2007 12:39 pm    Post subject: Reply with quote  Mark this post and the followings unread

k212, the tutorial you linked has nothing to do with it. It edits language.dll resources, but here we are talking about coding...

Back to top
View user's profile Send private message Visit poster's website Skype Account
NOD-Kane and Brotherhood
Cyborg Firebomber


Joined: 03 Sep 2005
Location: In a building,creating the fench Brotherhood of NOD and recruiting...

PostPosted: Thu Jul 05, 2007 1:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

So, it means that if we can add new locomotors, we can make planes flying like real planes and make them take off like in reality, i mean, a Bf 109 can't take off like a chopper... Do you see what i mean?

_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
k212
Flamethrower


Joined: 20 May 2006
Location: Spain

PostPosted: Thu Jul 05, 2007 1:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

maybe it can fix even trains???

and some comment on the code (for people who don't know about coding)

many code languages use not only variables but also classes,
variables can be of many types,for example :
float 2.3
char 'a'
String "TS rocks"
the concept of variable is extended with classes,and a "variable" that has as "type" a class, is called object
for example: harvester,mammoth tank,titan,etc could be objects of the class vehicle

a class contains :
variables,methods that can be called on the objects of that class and other methods,constans,etc
to reference a variable of a class, you need to use '.'
for example, if there is a class vehicle with a variable strength, to access strength,you write : object.strength (with object being an object from the class vehicle in this case)

Code:

if (m_bMoving)
{
// rotate an object
//m_crd appears to be contain the coordenate of the unit
m_crd.X = m_pos.X + m_radius * sin(m_angle);
m_crd.Y = m_pos.Y + m_radius * cos(m_angle);
m_crd.Z = m_pos.Z; the vehicle stays on the ground,so this doesn't change

TechnoClass::InterMoveLocker(m_pObject, 0);
TechnoClass::SetPos(m_pObject, &m_crd);
//m_pObject is the unit, and it's coordenates are set with m_crd,& means this method receives a reference to m_crd and not it's value
TechnoClass::InterMoveLocker(m_pObject, 1);

// increase an angle
m_angle += 0.01;
if (m_angle > 6.2831) //2*pi is an entire circle, so this means,it's ;back at where it started->m_angle=0, cuz 2*pi radians=0 radians
{
m_angle = 0;
}
}
return m_bMoving;

Last edited by k212 on Thu Jul 05, 2007 1:37 pm; edited 1 time in total

Back to top
View user's profile Send private message
DragonFly
Cyborg Soldier


Joined: 02 Jun 2007
Location: England

PostPosted: Thu Jul 05, 2007 1:27 pm    Post subject: Reply with quote  Mark this post and the followings unread

I wasn'ty aware trains were broken. They seem to follow the tracks perfectly fine...

I think the 2 most important ones are a jump jet locomoter with out thwe invincibilertty stuff and a flying locomoter that works with transports. But seeing as both those locos exist mayby it's easyier for CnC VK to fix those problems in ETS?

Back to top
View user's profile Send private message Skype Account
k212
Flamethrower


Joined: 20 May 2006
Location: Spain

PostPosted: Thu Jul 05, 2007 1:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

trains are not broken, but you can't build them ingame without problems, this might(i'm not sure) give us the option to solve this
btw if you make a new locomotor with the same name of an existing one,does it overwrite the old ones, like when you put new shps and vxls in an expand.mix with the same name like the old ones or ...?

Back to top
View user's profile Send private message
SMIFFGIG
General


Joined: 03 Mar 2003
Location: Great Britain

PostPosted: Thu Jul 05, 2007 2:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

nice "Proof of Concept" CNCVK, shame this particular loco is completely useless

Would it be possible to cart over any of the RA2/YR locos, to TS ?

also would a BalloonHover= (RA2 tag) effect be achievable via loco's

Finally, would it be possible to clone the Amphibious APC loco, so that it is possible to have more than just one amphibious loco (with alternate image)... i would imagine this would need further .exe editing to get working though

P.S. OT Please give us turrets on aircraft ability for rotors #Tongue

_________________

Back to top
View user's profile Send private message Send e-mail Skype Account
DragonFly
Cyborg Soldier


Joined: 02 Jun 2007
Location: England

PostPosted: Thu Jul 05, 2007 2:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

I think the biggest prioirty should be to try and make less buggy versions of the orig locos (eg jump jet vehicles that arn't invincible, turrets on aircraft etc) rather than bring in the RA2 locos.

@k212:
I highly dout a new loco will fix problems with trains seeing as I thought part of the problem was a train when built by a factory wouldn't be built on the track and also their isn't a way to make it so when you build X, Y and Z are also built which then do nothing other than follow X.

Back to top
View user's profile Send private message Skype Account
k212
Flamethrower


Joined: 20 May 2006
Location: Spain

PostPosted: Thu Jul 05, 2007 3:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

@dragonfly : actually there is a way to set Z ,X and Y when you build a new unit , but only with airplanes i think ; when all helipads are full and you make a new airplane, it comes in flying (has height) , although i don't think this is to any use

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Thu Jul 05, 2007 4:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

SMIFFGIG wrote:
nice "Proof of Concept" CNCVK, shame this particular loco is completely useless

Would it be possible to cart over any of the RA2/YR locos, to TS ?


You'd need to rewrite them.

Quote:
also would a BalloonHover= (RA2 tag) effect be achievable via loco's


No, because BalloonHover is a property from a class defined by game.exe. I believe that the locomotor dll receives parameters such as position, object and radius (as showed on CnCVKs sample above). So, you can change the values of the properties of the object, but you can't add new properties.

Quote:
Finally, would it be possible to clone the Amphibious APC loco, so that it is possible to have more than just one amphibious loco (with alternate image)... i would imagine this would need further .exe editing to get working though


I guess we could code something like that...

Back to top
View user's profile Send private message Visit poster's website Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Jul 05, 2007 5:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

Banshee wrote:
Quote:
also would a BalloonHover= (RA2 tag) effect be achievable via loco's

No, because BalloonHover is a property from a class defined by game.exe.

But BallonHover is nothing else than a Hover-Locomotor with a raised flying height. So i'm quite sure it is possible.

Something that would interest me is, from where do we get the variables?
I mean the Global Variables in rules.ini should be accessible. Like
HoverHeight, HoverDampen, HoverBob, HoverBoost, HoverAcceleration, HoverBrake
or the Jumpjet Variables like WobblesPerSecond etc.

Maybe it just suffice to use them in the code. But if not, what kind of variables do we have access? Can we have timer for infinite animations even while standing, like hoverwobbles?

What kind of classes do i can/have to import?
From where do i get those?
Do i have to use constructors/functions where i put the locomotor behavior code? How should they be named so i can use them in rules.ini?

Can you post the complete code for the loco you released?

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Thu Jul 05, 2007 8:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

BallonHover is a property of a vehicle type related class.

Quote:
I mean the Global Variables in rules.ini should be accessible. Like
HoverHeight, HoverDampen, HoverBob, HoverBoost, HoverAcceleration, HoverBrake
or the Jumpjet Variables like WobblesPerSecond etc.


Yea, they are suposed to be accessible, but only VK would know the answer for that.

Back to top
View user's profile Send private message Visit poster's website Skype Account
k212
Flamethrower


Joined: 20 May 2006
Location: Spain

PostPosted: Thu Jul 05, 2007 9:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

@LKO:

if there is a way to acces variables from rules.ini,we might actually add more superweapons, cuz probably they are just stored in an array[6] (length=6,cuz 6 superweapons)
i think it's an array ,cuz even if you add more to the list, it doesn't actually 'read' them, also it reads the superweapons secuencially, as proven in super weapon research (if you insert a new superweapon in the middle,the rest changes)
so maybe all we need to do to get them working, is to increment the size from 6 to whatever and it might work

also all these variables mentioned before all have virtual memory adresses,so we might be able to 'overwrite' hardcoded things if we find a way to change these values once the old ones have been written

for those who want to know more, if you have an except.ini in your SUN directory you might see something like : CS:EIP (CS is the segment, EIP offset) , these are of course numbers if we're talking about memory adresses and are mostly written in hex.in except.ini you'll see memory adresses where something 'wrong' happened :p

Back to top
View user's profile Send private message
Creagor
Cyborg Soldier


Joined: 05 Nov 2005
Location: Wales, UK

PostPosted: Fri Jul 06, 2007 6:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

Wow, very nice stuff going on here. Im actually very interested too see how this works, so some questions:

I understand the C++ code, but am not entirley sure how the game reads it...? And I'd also like to take a look at that assembly code you mentioned, I reckon that it the key to the above.

> The locomotors currently folow the format of GUID's, which is then read by the game right? Why though? Its not realy important, just curiosity - I can generate GUID's easy enough Smile But how did you "tell" the game which GUID to use?

But in any case, very cool stuff here, Well done, very well done.

_________________

Last edited by Creagor on Sat Jul 07, 2007 2:30 pm; edited 1 time in total

Back to top
View user's profile Send private message Visit poster's website Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sat Jul 07, 2007 7:16 am    Post subject: Reply with quote  Mark this post and the followings unread

Another question (@C&CVK):
As i can see, you can control what kind of animation the legs do. Am i right, that you can create this way a kind of Mech/Animal-Loco that can play more than just the walking frames? Like an additional standing anim or jumpjet flying animation.
Is it this way maybe even possible to have shp units with 32 instead of 8 facings? (for the walker section)

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Creagor
Cyborg Soldier


Joined: 05 Nov 2005
Location: Wales, UK

PostPosted: Sat Jul 07, 2007 2:34 pm    Post subject: Reply with quote  Mark this post and the followings unread

The locomotor controls the way it moves, the way it uses the frames, rather than the frames thenselves. The C++ code above uses simple maths to create a circle pattern, but with enough thinking you could get interesting things...

_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
DragonFly
Cyborg Soldier


Joined: 02 Jun 2007
Location: England

PostPosted: Sat Jul 07, 2007 2:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

but if ity controls how the frames are used couldn't it then use extra frames that don't noramlly exist to do something speicle?

Back to top
View user's profile Send private message Skype Account
VK
Pyro Sniper


Joined: 28 Jul 2005
Location: in GAMEMD.EXE

PostPosted: Sat Jul 07, 2007 6:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
theoretcially, couldnt you use dll files to make anyhitng not already hard coded into the executable?

no.
Quote:
(Theoretically I believe you could use this method for other features that use CLSIDs, however, aside from Locomotors, only the non-implemented AIGenerals use them.)

AIGenerals isn't implemented.

Quote:
VK, you and I both know that code is useless without the proper headers.

...while I create a new locomotors Smile


FS Locomotors:
DriveLocomotionClass
DropPodLocomotionClass
FlyLocomotionClass
HoverLocomotionClass
JumpjetLocomotionClass
LevitateLocomotionClass
MechLocomotionClass
TeleportLocomotionClass
TunnelLocomotionClass
WalkLocomotionClass


YR Locomotors:
DriveLocomotionClass
DropPodLocomotionClass
FlyLocomotionClass
HoverLocomotionClass
JumpjetLocomotionClass
MechLocomotionClass
RocketLocomotionClass
ShipLocomotionClas
TeleportLocomotionClass
TunnelLocomotionClass
WalkLocomotionClas


Quote:
I guess we could code something like that..

Quote:
so that it is possible to have more than just one amphibious loco (with alternate image)

no.
This another part of engine, you can only set up a draw matrix / shadow matrix and some other parameters.

Quote:
But how did you "tell" the game which GUID to use?

Code:

[SMECH]
Locomotor={0C2F47D2-34F5-445a-A38A-D66C70329646}



Quote:
As i can see, you can control what kind of animation the legs do.

no. this standard behaviour.

Quote:
Yea, they are suposed to be accessible, but only VK would know the answer for that.

it can be accessible by some code.

I don't modify any code in EXE file at all.

This is test - you will have IE, if you try to save/load game.

Short explanation how it work.
Because Westwood isn't realize all code, we still should use thunks on asm code.

In other words, we can compare TS Engine with Operating System.
OSy gives to programs different APIs.
(such as memory management, files system, UI things)

part from TSThunks.cpp
Code:
   
    // set object position immediately
    void SetPos(void* pObject, CoordStruct* crd)
    {
        _asm {
            push    crd
            mov     ecx, pObject
            mov     edx, [ecx]
            call    dword ptr [edx + 0x188]
        }
    }

    CoordStruct* GetPos(void* pObject, CoordStruct *crd)
    {
        CoordStruct *ret_val;

        _asm {
            push    crd
            mov     ecx,pObject
            mov     edx,[ecx]
            call    dword ptr [edx + 0x184]
            mov     [ret_val], eax
        }
        return ret_val;
    }


I can create a DLL file which will export most of important TS Engine functions.

So you will link you program with my DLL and you won't by worried by writing an assembler code.

So for example, if you want to see "Speed" value from RULES.INI file, you will call "Type_GetSpeed function".

theoretically, the DLL file with locomotor can be ... in another part of world. By using RPC Very Happy


In attachment, you can see a VKLocomotor code.
Please DON'T use my GUID value.
(This code designed for CL.EXE 14.00.50727.42, if you want to use another compiler, I can create code for it)

However this still have problems.



NewLocomotor.zip
 Description:

Download
 Filename:  NewLocomotor.zip
 Filesize:  4.89 KB
 Downloaded:  340 Time(s)


_________________
ARM forever - x86 sucks

Back to top
View user's profile Send private message Skype Account
Vefbl4
General


Joined: 07 Feb 2007

PostPosted: Sun Jul 08, 2007 8:11 am    Post subject: Reply with quote  Mark this post and the followings unread

Ur Genius.. Smile Make ra1 style planes make planes!!!OMG.. Very Happy Ill use this stuff in my mod.. !

_________________
Lost Relic[mod]
Lost Relic[game]

Back to top
View user's profile Send private message
DragonFly
Cyborg Soldier


Joined: 02 Jun 2007
Location: England

PostPosted: Sun Jul 08, 2007 8:53 am    Post subject: Reply with quote  Mark this post and the followings unread

do make planes which can land/take off on a run way (even if that runway has to be a preset direction) as jump jetting planes don't aways look to good.

Back to top
View user's profile Send private message Skype Account
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Sun Jul 08, 2007 9:25 am    Post subject: Reply with quote  Mark this post and the followings unread

no, don't make new locos first of all.
Please make a tutorial how we can make new locos.
Else you get a huge amount of loco-requests: please make me plane-loco,mech-loco,jumpjet-loco, air-transport-loco etc

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Creagor
Cyborg Soldier


Joined: 05 Nov 2005
Location: Wales, UK

PostPosted: Sun Jul 08, 2007 10:06 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
But how did you "tell" the game which GUID to use?

Code:

[SMECH]
Locomotor={0C2F47D2-34F5-445a-A38A-D66C70329646}


No,I mean, how did you get the game to "know" that the GUID of {0C2F47D2-34F5-445a-A38A-D66C70329646} executes the code in the DLL.

Edit: Never mind, one look at Main.h explained all Smile

Im still looking at the code now. Not being that familiar with C++ doesnt help, bit I can see how it works at least. I need to take a closer look, this is really interesting... I reckon other stuff - not just locomotors could be added/changed with this method, with the right coding and enough knowlage.

_________________

Back to top
View user's profile Send private message Visit poster's website Skype Account
Alexander C Bukington
Grenadier


Joined: 09 Mar 2007

PostPosted: Wed Jul 11, 2007 12:13 am    Post subject: Reply with quote  Mark this post and the followings unread

actually if you wanna make somethings look weird when walking just give infantry the image of the wolverine or visaversa

Back to top
View user's profile Send private message AIM Address
k212
Flamethrower


Joined: 20 May 2006
Location: Spain

PostPosted: Sat Jul 14, 2007 9:52 am    Post subject: Reply with quote  Mark this post and the followings unread

a question about all this, if a proper loco can make flying units carry infantry,can another 'new' loco activate correctly dropships?

Back to top
View user's profile Send private message
Rico
Tiberian Beast


Joined: 01 Nov 2004
Location: Sydney, Australia

PostPosted: Sat Jul 14, 2007 11:43 am    Post subject: Reply with quote  Mark this post and the followings unread

and if so can someone makes these locos Wink

Back to top
View user's profile Send private message Skype Account Yahoo Messenger Account
MetalMario
Vehicle Driver


Joined: 15 Jul 2003
Location: Canada

PostPosted: Fri Jul 27, 2007 3:30 am    Post subject: Reply with quote  Mark this post and the followings unread

Okay, you've got my attention. So much for being inactive for a year... #Tongue

This is totally amazing! You've finally cracked TS's CLSID system! I have so many questions and interests, I'll just try to put down what I can think of:

-Is it possible to implement an AIGeneral, despite the feature being unused? Like, is the framework in place despite there not being any actual classes defined by the game, such that we could plug in one of our own if we could somehow figure out how they're supposed to work?
-Could you do the kindness of making a .h file defining a "generic locomotor" class that we can derive from and make our own locomotors with? To take care of all the mind-numbingly messy stuff to deal with.
-Can we make our own implementations of the classes defined in the TLB files? I'd guess they're totally unrelated to this, but I really don't know.
-Can we isolate and export the assembly code describing WW's own Locomotors, and put them into a DLL of their own? Would this allow us to splice RA2/YR Locos into TS, or possibly even import the working TS1.0 flight Locomotor without losing the FS stuff?
-How much control does a Locomotor have of the TS engine? Can we, say, make a Locomotor that spawns a trail of Tiberium behind the unit? Or a "chrono" locomotor that actually leaves an animation behind when it teleports?
-If Locomotors can control animation frames, could we make a better "slave miner" effort for vehicles that behave the same way as infantry?
-Are HVA animations controlled by Locomotors? Could we make a RA2-style loco that actually plays the HVA animations of units while they fly around, for stuff like rotors?

I could really just keep going on, but I'll spare you.

Back to top
View user's profile Send private message Skype Account
BrianPrime
Shrapnel Sniper


Joined: 26 Jul 2007

PostPosted: Fri Jul 27, 2007 1:14 pm    Post subject: Reply with quote  Mark this post and the followings unread

Surely you would have expected this to be the next logical step in fully tearing down the walls and boundaries? Wink

I am very pleased to see such work being pursued, might even convert PreRA2 over to YR if such stuff as this get put into Npatch. Seriously VK, you're a genius, this kind of stuff is what keeps these old games alive, and in this case makes them better. Good show!

Back to top
View user's profile Send private message
ORCACommander
Commander


Joined: 14 Feb 2006
Location: Flying into hostile territory

PostPosted: Fri Jul 27, 2007 1:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

@metal: you can already implement the generals. All there data is located and referenced from AI.TLB

_________________

Back to top
View user's profile Send private message
CCHyper
Defense Minister


Joined: 07 Apr 2005

PostPosted: Fri Jul 27, 2007 9:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

err no, the AIGenerals do not exist in the EXE #Tongue, they may be in the AI.TLB, but they do nothing.

Back to top
View user's profile Send private message
ORCACommander
Commander


Joined: 14 Feb 2006
Location: Flying into hostile territory

PostPosted: Sat Jul 28, 2007 12:41 am    Post subject: Reply with quote  Mark this post and the followings unread

wrong. I've gotten them to work. the generals are not referenced from the exe it references AI.tlb its just that they are under developed as ww seemed to have abandonned the feature in its early development.

_________________

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 2 [63 Posts] Goto page: 1, 2 Next
Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.2354s ][ Queries: 13 (0.0140s) ][ Debug on ]