Jump to content


Photo

APT problems...

rotwk bfme2 apt ingameheroselect

  • Please log in to reply
6 replies to this topic

#1 Suchar

Suchar

    Suchy

  • Members
  • 100 posts
  • Location:Poland
  • Projects:PRO MOD
  •  Lonely coder

Posted 05 April 2015 - 12:33 PM

Hi!

I posted topic here some time ago, where I was asking you for help with adding new hero images slots. (http://forums.revora...le/#entry990584)

Now, (with more experience) I have return to that unsolved problem, and I have noticed a very strange situations...

I am creating a new topic for this, because I don't want to revive death topic and the problem is slightly different.

When I was searching why I can't add more slots, I saw, that the code I am changing affects only to first 10 slots, and game ignore the rest of the apt code:

"ingameheroselect.xml"

Spoiler

 

I writed here random position, only for testing. And how should it looks like (the red circles is the positions of hero images):

 

sshot0033red.jpg

 

How it actually looks:

 

sshot0033.jpg

 

As you can see, the game ignores the coded positions of the 11th and more hero recruit, and gives they orginal positions.

And here is my question: how computer can ignore some parts of code?

Or is that file included somewhere, in other file that predominate code for more heroes?


Edited by Suchar, 05 April 2015 - 12:34 PM.


#2 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 07 April 2015 - 08:58 AM

Might be the auto sorting algorithm or something like that used in the UI for the game...

Although it's been quite some time since I looked at it...


Ridder Geel

#3 Suchar

Suchar

    Suchy

  • Members
  • 100 posts
  • Location:Poland
  • Projects:PRO MOD
  •  Lonely coder

Posted 07 April 2015 - 10:35 AM

Why EA had to complicate even silmpy parts of code?  :thumbsdownsmiley: 
How this sorting algorithm works? As i think, it is coded in the source code of the game, isn't it?


Edited by Suchar, 07 April 2015 - 10:37 AM.


#4 Ridder Geel

Ridder Geel

    Master Yelloh

  • T3A Staff
  • 10,852 posts
  • Location:The Netherlands (AKA: Holland)
  • Projects:RC Mod + SEE + RTS Engine
  •  The Dangerous T3A Team Chamber Member
  • Division:BFME
  • Job:T3A Staff

Posted 07 April 2015 - 10:47 AM

It might (not sure) be in some part of the data that we can't really edit yet of the APT. Not sure though...


Ridder Geel

#5 Gwanw

Gwanw
  • Members
  • 150 posts
  • Location:Germany
  • Projects:OpenSAGE
  •  ...

Posted 19 April 2015 - 11:27 AM

I think the problem is a big part after the first lines you edited.
At linenumber 941 is a recall for the herocharacters (through the moveflag), so you have to look for such characters with an additional "hasmatrix" flag.

This flag repositions the old character with the new position of that character, thus if you didnt change that, too, there are still the old positions.

Remove the "hasmatrix" flag for that objects, that should be the easiest way to fix that^^.



#6 Suchar

Suchar

    Suchy

  • Members
  • 100 posts
  • Location:Poland
  • Projects:PRO MOD
  •  Lonely coder

Posted 19 April 2015 - 04:39 PM

Thank you Gwanw, that fix the problem with positioning existing slots!   :thumbsuphappy:  I'm in a debt of gratitude for you  :p

Anyway I'm also trying to add new slots, but for now without succes...

Have you got any ideas for that? I was trying to add new slots in main code, and also in recall code:

				<placeobject depth="413" character="101" rotm00="1.000000" rotm01="0.000000" rotm10="0.000000" rotm11="1.000000" tx="513.950012" ty="-70.000000" red="255" green="255" blue="255" alpha="0" ratio="0.000137" clipdepth="-1" unknown="0">
					<poflags value="HasCharacter|HasColorTransform|HasMatrix|HasName|HasRatio" />
					<poname name="Hero17" />
				</placeobject>
				<placeobject depth="415" character="101" rotm00="1.000000" rotm01="0.000000" rotm10="0.000000" rotm11="1.000000" tx="93.949997" ty="-140.000000" red="255" green="255" blue="255" alpha="0" ratio="0.000137" clipdepth="-1" unknown="0">
					<poflags value="HasCharacter|HasColorTransform|HasMatrix|HasName|HasRatio" />
					<poname name="Hero18" />
				</placeobject>

and:

				<placeobject depth="413" character="-1" rotm00="1.000107" rotm01="0.000000" rotm10="0.000000" rotm11="1.000000" tx="514.049988" ty="-70.000000" red="255" green="255" blue="255" alpha="255" ratio="0.000000" clipdepth="-1" unknown="0">
					<poflags value="HasColorTransform|HasMatrix|Move" />
				</placeobject>
				<placeobject depth="415" character="-1" rotm00="1.000107" rotm01="0.000000" rotm10="0.000000" rotm11="1.000000" tx="23.950001" ty="-140.000000" red="255" green="255" blue="255" alpha="255" ratio="0.000000" clipdepth="-1" unknown="0">
					<poflags value="HasColorTransform|HasMatrix|Move" />
				</placeobject>

(as you can see with "HasMatrix" flag) but the game ignores this new parts...

PS.

Thank you very much for that what you do so far  :)



#7 Gwanw

Gwanw
  • Members
  • 150 posts
  • Location:Germany
  • Projects:OpenSAGE
  •  ...

Posted 20 April 2015 - 08:15 AM

Not sure, i think, theres no way to add additional slots.

 

 

                   <pushconstant val="19"/>

                    <pushvalue val="19"/>
                    <increment/>
                    <setvariable/>
                    <branchalways offset="-53"/>

Thats the actionscript for adding new parts, but theres a branchalways, thus the maximal amount of visible heroes should be hardcoded.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users