Jump to content


Photo

Ganon's Coding Questions


  • Please log in to reply
67 replies to this topic

#21 Ganon

Ganon

    What's this?

  • Project Team
  • 967 posts
  • Location:Ohio, United States
  • Projects:My Link Mod
  •  Code Scientist

Posted 21 December 2010 - 01:44 PM

Anyway, so does a hero actually need that in their code?


Nevermind, I answered my own question with just a little research.

These heroes have the HeroSortOrder:
Gandalf = 10
Aragorn = 20
Legolas = 30
Gimli = 40
Boromir = 50
Frodo = 60
Sam = 70
Merry = 80
Pippin = 90
-------------------------------------------------------------------------
And these do not:
Arwen
Balrog
Damrod
Denethor
Elrond
Eomer
Eowyn
Eye of Sauron
Faramir
Fellbeast
Galadriel
Gamling
Gollum
Gothmog
Gwaihir
Haldir
Isildur
Lurtz
Saruman
Shelob
Theoden
Treebeard
WitchKing
-------------------------------------------------------------------------
I'm assuming that the lower the number, the higher the priority that their portrait will be shown in multi-select. I could be wrong.

Edited by Ganon2020, 21 December 2010 - 02:18 PM.


#22 clank234

clank234

    The guy who is always on the forums :)

  • Members
  • 489 posts
  • Location:England
  • Projects:Scaled war in the South
  •  coder, skinner, modeler, a lot of help from Ridder Geel and Kwen :)

Posted 22 December 2010 - 10:54 AM

In moria, thats the order of how the HI goes
"Strayed by the little and it will fail" ~ Galadriel

"So do all you live to see such times, but all we have to decide is what to do with the time that is given to us" ~ Gandalf

"Many that live deserve death, and some that die deserve life" ~ Gandalf

"Men, men are weak" ~ Elrond

"Then i will die as one of them" ~ Aragorn

"Certaincy of death, small chance of success. What are waiting for?" ~ Gimli

"How about dying side by side with a friend" ~ Legolas

"War will make corpses of us all" ~ Faramir


-------------------------------------
Posted Image

#23 Ganon

Ganon

    What's this?

  • Project Team
  • 967 posts
  • Location:Ohio, United States
  • Projects:My Link Mod
  •  Code Scientist

Posted 22 December 2010 - 04:04 PM

You are absolutely correct. :p

But, I wanted to see if someone had any experience with it, or has used it in any way. :p

#24 Ganon

Ganon

    What's this?

  • Project Team
  • 967 posts
  • Location:Ohio, United States
  • Projects:My Link Mod
  •  Code Scientist

Posted 03 January 2011 - 09:23 AM

Has anyone ever seen a Behavior that could make an object's buildtime increase or decrease with an Upgrade?

I want to increase buildtime on something, but for what I'm trying to do, I can't change the buildtime on the object, or the production speed on the structure that builds it.

I need another way.

#25 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 03 January 2011 - 11:10 AM

Can't you use the same kind of behavior thing that the fortress uses for making the heroes/porters faster reviving?
...
Oh wait thats bfme 2.. my bad..

Edited by Ridder Geel, 03 January 2011 - 01:58 PM.

Ridder Geel

#26 Ganon

Ganon

    What's this?

  • Project Team
  • 967 posts
  • Location:Ohio, United States
  • Projects:My Link Mod
  •  Code Scientist

Posted 03 January 2011 - 11:32 AM

And this works in BFME 1?

#27 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 03 January 2011 - 12:50 PM

oh wait... right lemme check ;)
Right.... try this one?

Behavior = CostModifierUpgrade ModuleTag_CostModifier1;makes heroes cheaper
		LabelForPalantirString = GUI:HERO_DISCOUNT
		StartsActive = Yes; Run on build complete, not upgrade
		ObjectFilter		= ANY +HERO 
		Percentage		= 0%
		Percentage		= -10%
		Percentage		= -20%
		Percentage		= -30%
	End
Should work i think...
Ridder Geel

#28 Ganon

Ganon

    What's this?

  • Project Team
  • 967 posts
  • Location:Ohio, United States
  • Projects:My Link Mod
  •  Code Scientist

Posted 03 January 2011 - 01:23 PM

Now you got me confused since you edited your last post.

Anyway, I'm not trying to change the cost, I'm trying to change the Buildtime.
And builtime on the object must not be changed initially (i.e. without an upgrade), and Production speed on the structure must not be changed.

Edit: That first bit of code you posted looked promising. It's too bad it only works for BFME 2. ;)

Edited by Ganon2020, 03 January 2011 - 01:30 PM.


#29 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 03 January 2011 - 01:57 PM

Yea.. mmm... How about... as soon as you get the upgrade, make the structure's commandset change? so it instead creates a childobject which has a lower/higher buildtime.
Ridder Geel

#30 Ganon

Ganon

    What's this?

  • Project Team
  • 967 posts
  • Location:Ohio, United States
  • Projects:My Link Mod
  •  Code Scientist

Posted 03 January 2011 - 02:21 PM

So there is really no other way? Damn, I guess I kind of expected that.

...I didn't want to go through the trouble of creating child objects, for the sake of something as insignificant as Buildtime. Oh well.

Edited by Ganon2020, 03 January 2011 - 02:24 PM.


#31 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 03 January 2011 - 04:09 PM

You can make a childobject in a matter of minutes... ;)
Ridder Geel

#32 Ganon

Ganon

    What's this?

  • Project Team
  • 967 posts
  • Location:Ohio, United States
  • Projects:My Link Mod
  •  Code Scientist

Posted 03 January 2011 - 04:25 PM

And if I wanted the AI to use this new childobject?... ;)

Too much work for something as simple as what I want to do. It's OK though, there's a viable workaround in my particular situation.

Thanks anyway.

Edited by Ganon2020, 03 January 2011 - 04:26 PM.


#33 Ganon

Ganon

    What's this?

  • Project Team
  • 967 posts
  • Location:Ohio, United States
  • Projects:My Link Mod
  •  Code Scientist

Posted 07 January 2011 - 07:50 AM

So, who knows what would be the quickest/easiest way to force the AI to buy upgrades more often?--Supposing resources aren't an issue.

Edited by Ganon, 07 January 2011 - 11:23 AM.


#34 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 January 2011 - 10:52 AM

...\data\ini\default\skirmishaidata.ini

wrong code.... my bad :D

Edited by Ridder Geel, 07 January 2011 - 11:16 AM.

Ridder Geel

#35 Ganon

Ganon

    What's this?

  • Project Team
  • 967 posts
  • Location:Ohio, United States
  • Projects:My Link Mod
  •  Code Scientist

Posted 07 January 2011 - 11:12 AM

Dammit Geel, are you givin' me BFME 2 code again? :D

#36 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 January 2011 - 11:16 AM

oh shit... my bad :D
Well In the AI scripts in BFME 1 there should be something similar... ;)
Ill check it right away... *I should sleep more, and pay more attention to which subforum :p*
Ridder Geel

#37 Ganon

Ganon

    What's this?

  • Project Team
  • 967 posts
  • Location:Ohio, United States
  • Projects:My Link Mod
  •  Code Scientist

Posted 07 January 2011 - 11:20 AM

No prob. At least you're going through the trouble to help me.

I'm not much good with AI, I can get new units, structures, and powers to work, but as far as Global AI changes, no way.

Edited by Ganon, 07 January 2011 - 11:20 AM.


#38 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 January 2011 - 11:29 AM

Well... At first glance i think you should look in the
ai_upgrade_execution
library file...
then in AI - Upgrade System Controls folder...
If you want most of the upgrades to get purchased faster you would need to edit the "...... teams upgrade purchase scripts" scripts. They have lines such as:
*AND* Player '<This Player's Enemies>' has Greater Than or Equal To 3 unit or structure of type 'Flammable List'
If you make the requirement of that less than 3 they would choose to upgrade whatever it is "one" horde/unit "faster" than normal.
*AND* Player '<This Player's Enemies>' has Greater Than or Equal To 2 unit or structure of type 'Hero_Units'
Same there... At least thats what i suppose.
You said money is not a problem, so yea this is what you would need to edit unless im mistaken...

Same goes for the "Tech upgrades" you would need to remove/decrease any other possible requirements for it to be done :D

Edited by Ridder Geel, 07 January 2011 - 11:30 AM.

Ridder Geel

#39 Ganon

Ganon

    What's this?

  • Project Team
  • 967 posts
  • Location:Ohio, United States
  • Projects:My Link Mod
  •  Code Scientist

Posted 07 January 2011 - 11:50 AM

Cool, thanks a bunch! :D


Edit: Well now that I have the scripts set up much better, I have to go into each faction's AI and make sure that each applicable team has the script. Because not all teams with upgradeable units have the upgrade scripts to begin with. ;)

That's a lot o' work!

I hate AI. :p

Edited by Ganon, 18 September 2011 - 12:58 PM.


#40 Ganon

Ganon

    What's this?

  • Project Team
  • 967 posts
  • Location:Ohio, United States
  • Projects:My Link Mod
  •  Code Scientist

Posted 07 January 2011 - 10:54 PM

I got another question.

Is there an AI script, that tells your team that a hero is nearby?

I'm trying to optimize hero abilities, and here is my current generic script for One-Shot abilities, like Wounding Arrow:
*** IF ***
	 Player '<This Player>''s Team '<This Team>' are ready to use Ability 'Command_GondorGandalfIstariLight' (at least one member).
*** THEN ***
   Team '<This Team>' use Ability 'Command_GondorGandalfIstariLight'  on nearest enemy with Kind is 'HERO'

I want my heroes to see that a hero is nearby and use their ability on them. Instead of wasting it, on a random orc. :D

The above script works fine, but one problem is that once the ability is ready, the hero goes running off to attack the nearest random enemy hero on the map that isn't neccessarily all that close. ;) (i.e. Lurtz runs across the map to cripple strike some random hero)

...

Any suggestions?

Edited by Ganon, 08 January 2011 - 10:26 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users