Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » New PT's
New PT's [message #427455] Mon, 03 May 2010 14:17 Go to next message
Omar007 is currently offline  Omar007
Messages: 1711
Registered: December 2007
Location: Amsterdam
Karma: 0
General (1 Star)
Im wondering whether it is possible to change the PT's Purchase List
I dont even know how it chooses its default actually, but i basically want to replace that with another entry.

Picture to illustrate:
index.php?t=getfile&id=12688&private=0

So when Secrets is chosen, only the entries in Secrets must be visible in the PT. GDI must not.
(chosen as in selected with a script ingame)

And please look at Secrets as if its a new entry and not the extra characters Wink

What i did found in engine_pt.cpp was these rows (i hope the comments are indeed what they mean):
DefinitionArray = (PurchaseSettingsDefClass **)0x0085E180; //The entries inside the Character Classes of the picture above??
Find_Purchase_Definition = (void *)0x006F2BD0; //The characters tab
Find_Team_Purchase_Definition = (void *)0x006F3430; //The enlisted (main) entries


Would it be possible to point these to one of the new entries?
Using the Set_Preset() method and hardcode every new preset is what i want to avoid with this.


http://tiberiumredux.omarpakker.nl/Old Unused Parts/Plaatjes/PromoteBanner_Hades_small.jpg

[Updated on: Mon, 03 May 2010 14:30]

Report message to a moderator

Re: New PT's [message #427576 is a reply to message #427455] Wed, 05 May 2010 07:51 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3811
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Omar007 wrote on Mon, 03 May 2010 15:17

Im wondering whether it is possible to change the PT's Purchase List
I dont even know how it chooses its default actually, but i basically want to replace that with another entry.

Picture to illustrate:
index.php?t=getfile&id=12688&private=0

So when Secrets is chosen, only the entries in Secrets must be visible in the PT. GDI must not.
(chosen as in selected with a script ingame)

And please look at Secrets as if its a new entry and not the extra characters Wink

What i did found in engine_pt.cpp was these rows (i hope the comments are indeed what they mean):
DefinitionArray = (PurchaseSettingsDefClass **)0x0085E180; //The entries inside the Character Classes of the picture above??
Find_Purchase_Definition = (void *)0x006F2BD0; //The characters tab
Find_Team_Purchase_Definition = (void *)0x006F3430; //The enlisted (main) entries


Would it be possible to point these to one of the new entries?
Using the Set_Preset() method and hardcode every new preset is what i want to avoid with this.

The function already exists "Change_Spawn_Char(int Team,const char *Name);"


Re: New PT's [message #427578 is a reply to message #427576] Wed, 05 May 2010 08:20 Go to previous messageGo to next message
Omar007 is currently offline  Omar007
Messages: 1711
Registered: December 2007
Location: Amsterdam
Karma: 0
General (1 Star)
Jerad Gray wrote on Wed, 05 May 2010 16:51

Toggle Spoiler

The function already exists "Change_Spawn_Char(int Team,const char *Name);"

That changes the spawn character. I dont want that Razz
I want the PT entries to dynamicly change to what gets selected.
So each of these Character Class entries contain other chars and values.
I could do it by re-setting (not resetting Razz) every PT entry using Set_Preset() but that would require me to hardcode all presets for every Character Class LE Entry.


http://tiberiumredux.omarpakker.nl/Old Unused Parts/Plaatjes/PromoteBanner_Hades_small.jpg

[Updated on: Wed, 05 May 2010 08:25]

Report message to a moderator

Re: New PT's [message #427580 is a reply to message #427578] Wed, 05 May 2010 08:47 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3811
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Oh misunderstood what you were after, but even if you did manage to make them dynamically change without crashing (preset name length changes might case overflow etc), you'd still have an issue with clients not updating on their end, which would be really annoying.

Re: New PT's [message #427599 is a reply to message #427455] Wed, 05 May 2010 13:10 Go to previous messageGo to next message
Omar007 is currently offline  Omar007
Messages: 1711
Registered: December 2007
Location: Amsterdam
Karma: 0
General (1 Star)
Update_PT (or something) would solve that.
The name length would be indeed an issue if the selected is longer then the entry it started with.
Just make the default the longest. Wink


http://tiberiumredux.omarpakker.nl/Old Unused Parts/Plaatjes/PromoteBanner_Hades_small.jpg
Re: New PT's [message #427645 is a reply to message #427599] Thu, 06 May 2010 12:33 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3811
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Omar007 wrote on Wed, 05 May 2010 14:10

Update_PT (or something) would solve that.
The name length would be indeed an issue if the selected is longer then the entry it started with.
Just make the default the longest. Wink

The issue that I'm talking about is getting the pt to update and match the host's pt data, pt icons are loaded to match what the client has in their objects.ddb file/temps20.ddb file. So you'd have to explicitly tell the client that the icons/strings were different and change them remotely via some currently nonexistent script function.


Re: New PT's [message #427655 is a reply to message #427645] Thu, 06 May 2010 14:41 Go to previous messageGo to next message
Omar007 is currently offline  Omar007
Messages: 1711
Registered: December 2007
Location: Amsterdam
Karma: 0
General (1 Star)
Jerad Gray wrote on Thu, 06 May 2010 21:33

Omar007 wrote on Wed, 05 May 2010 14:10

Update_PT (or something) would solve that.
The name length would be indeed an issue if the selected is longer then the entry it started with.
Just make the default the longest. Wink

The issue that I'm talking about is getting the pt to update and match the host's pt data, pt icons are loaded to match what the client has in their objects.ddb file/temps20.ddb file. So you'd have to explicitly tell the client that the icons/strings were different and change them remotely via some currently nonexistent script function.

I dont really get you then.
If you would harcode everything, you call Set_Preset() to change the PT entries 1 by 1. Then you update every client with Update_PT.
AFAIK this is the way that works.

What i want now is only changing the way the PT entries get changed. It can already be done (Set_Preset()) but i want it to be changed according to a new Character Class entry in LE instead of hardcoded data.


http://tiberiumredux.omarpakker.nl/Old Unused Parts/Plaatjes/PromoteBanner_Hades_small.jpg
Re: New PT's [message #428181 is a reply to message #427455] Thu, 13 May 2010 05:35 Go to previous messageGo to next message
Omar007 is currently offline  Omar007
Messages: 1711
Registered: December 2007
Location: Amsterdam
Karma: 0
General (1 Star)
Anyone? Reborn? TT team ppl? Dont Get It

http://tiberiumredux.omarpakker.nl/Old Unused Parts/Plaatjes/PromoteBanner_Hades_small.jpg
Re: New PT's [message #428233 is a reply to message #427455] Thu, 13 May 2010 14:15 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
If I was able to help you, I would of posted. I just do not know enough about this topic you're talking about, sorry. Sad


Re: New PT's [message #428242 is a reply to message #427655] Thu, 13 May 2010 14:53 Go to previous messageGo to next message
saberhawk
Messages: 1068
Registered: January 2006
Location: ::1
Karma: 0
General (1 Star)
Omar007 wrote on Thu, 06 May 2010 17:41

Jerad Gray wrote on Thu, 06 May 2010 21:33

Omar007 wrote on Wed, 05 May 2010 14:10

Update_PT (or something) would solve that.
The name length would be indeed an issue if the selected is longer then the entry it started with.
Just make the default the longest. Wink

The issue that I'm talking about is getting the pt to update and match the host's pt data, pt icons are loaded to match what the client has in their objects.ddb file/temps20.ddb file. So you'd have to explicitly tell the client that the icons/strings were different and change them remotely via some currently nonexistent script function.

I dont really get you then.
If you would harcode everything, you call Set_Preset() to change the PT entries 1 by 1. Then you update every client with Update_PT.
AFAIK this is the way that works.

What i want now is only changing the way the PT entries get changed. It can already be done (Set_Preset()) but i want it to be changed according to a new Character Class entry in LE instead of hardcoded data.


So don't hardcode the data? Either load it via some other method or basically copy it over from the "secrets" menu.
Re: New PT's [message #428570 is a reply to message #427455] Mon, 17 May 2010 02:20 Go to previous messageGo to next message
Omar007 is currently offline  Omar007
Messages: 1711
Registered: December 2007
Location: Amsterdam
Karma: 0
General (1 Star)
I can indeed copy the Secret menu but that is because that's already loaded.

If i had only 1 other team this would be no issue but i happen to have 3 in total Big Grin

I'm a little stuck now i guess Sad


http://tiberiumredux.omarpakker.nl/Old Unused Parts/Plaatjes/PromoteBanner_Hades_small.jpg

[Updated on: Mon, 17 May 2010 02:44]

Report message to a moderator

Re: New PT's [message #428573 is a reply to message #428570] Mon, 17 May 2010 04:02 Go to previous messageGo to next message
saberhawk
Messages: 1068
Registered: January 2006
Location: ::1
Karma: 0
General (1 Star)
Omar007 wrote on Mon, 17 May 2010 05:20

I can indeed copy the Secret menu but that is because that's already loaded.

If i had only 1 other team this would be no issue but i happen to have 3 in total Big Grin

I'm a little stuck now i guess Sad


You can also use whatever kind of configuration file you'd like to actually store the info. INI files would work rather well. Set_Preset doesn't care where it gets it's information from.
Re: New PT's [message #428602 is a reply to message #428573] Mon, 17 May 2010 13:48 Go to previous message
Omar007 is currently offline  Omar007
Messages: 1711
Registered: December 2007
Location: Amsterdam
Karma: 0
General (1 Star)
Saberhawk wrote on Mon, 17 May 2010 13:02

Omar007 wrote on Mon, 17 May 2010 05:20

I can indeed copy the Secret menu but that is because that's already loaded.

If i had only 1 other team this would be no issue but i happen to have 3 in total Big Grin

I'm a little stuck now i guess Sad


You can also use whatever kind of configuration file you'd like to actually store the info. INI files would work rather well. Set_Preset doesn't care where it gets it's information from.

Yea thats true but i wanted to get it to work through new LE presets.
Oh well if that cant be done i'll just set it in configuration files.


http://tiberiumredux.omarpakker.nl/Old Unused Parts/Plaatjes/PromoteBanner_Hades_small.jpg
Previous Topic: Editor Help!
Next Topic: M10_Playertype_Nod
Goto Forum:
  


Current Time: Fri Nov 29 23:20:58 MST 2024

Total time taken to generate the page: 0.01668 seconds