collapse

Author Topic: Help/Advice With Coding Questions for W.I.P.s  (Read 3111 times)

0 Members and 1 Guest are viewing this topic.

Offline Playing Enemy

  • Portrait & Screenpack Creator
  • Contributor
  • ****
  • Posts: 911
  • Last Login:December 26, 2018, 03:59:17 PM
  • THE HARD GOODBYE
    • Royalty7 - The best decision I ever made
    • Email
Re: Help/Advice With Coding Questions for W.I.P.s
« Reply #25 on: April 22, 2016, 10:16:40 PM »
And don't forget, trial and error also is a key thing of learning. Challenge yourself. If you ever took apart toys as a kid and put em back together again then youll know exactly where I'm coming from ;) lol
I know what you mean and totally agree with you too. I love messing around with stuff to understand how it works. Me having to figure things out in the past has led to learning about all sorts of cool new stuff I never would've known about otherwise.

On another note, I have a new issue that I was hoping to get some help with if possible. I've converted a character to Winmugen, and he is running fine, except his AI automatically takes over. I've managed to locate the cause for the most part, but not sure exactly. If I just remove the whole thing, he runs without automatic AI, but has some odd graphical issues, but if I leave it, he has auto AI. I was just curious if someone could pinpoint the line/s of code that is actually causing the AI to take over, so that I could then attempt to properly remove it without jeopardizing any of the other coding.

(click to show/hide)

Like I said, if I just delete the whole section of code, his ai doesn't takeover, but has graphical issues such as, his "Level" bar text is misplaced, and his bat for his bat special sprites get distorted and split up. I'm not sure why graphical issues would be linked to his cmd file, but as I said, these things don't happen if I leave the coding as is. It's strange.


        "Maybe I am what they say I am.  A maniac...a psycho killer."

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Help/Advice With Coding Questions for W.I.P.s
« Reply #26 on: April 23, 2016, 06:00:55 AM »
I don't know what all that does. I can tell you that it's rather stupid

triggerall = var(59) >6
triggerall = var(59)=1
Those are mutually exclusive. var(59) can't be 1 AND greater than 6. Good thing it's a null and all those triggers get evaluated regardless of the triggeralls being correct.

I am guessing that most of those vars help with the rest of the AI. The := bit is an assignment and you can use it to set a variable within a line of code without a varset.

Find out where var(59) is being turned on and how. That's just AI code, it's not the activation method.

Offline Playing Enemy

  • Portrait & Screenpack Creator
  • Contributor
  • ****
  • Posts: 911
  • Last Login:December 26, 2018, 03:59:17 PM
  • THE HARD GOODBYE
    • Royalty7 - The best decision I ever made
    • Email
Re: Help/Advice With Coding Questions for W.I.P.s
« Reply #27 on: April 23, 2016, 10:33:44 PM »
The "triggerall = var(59) >6" line is there because it's supposed to be "triggerall = AILevel >6", as it was before I edited all the AILevel code to be var(59). The "triggerall = var(59)=1" line right after it is supposed to be like that though, cause I didn't edit that part, just the line before it.
I did go through all his coding and found this in his system.cns file. I believe this is how var(59) is being activated.
(click to show/hide)

I also remember reading somewhere that auto ai can be linked to triggers/coding that is present in each state of the character, such as this right here...but I could be totally wrong about that as well.
(click to show/hide)
or this section, which is located in the same attacks state coding as the code right above this.
(click to show/hide)
Just with all the AIlevel's being switched to var(59), so it looks like this
(click to show/hide)
I'm not sure, but these 2 sections of code seem to be dependent to the original Null code I posted, and this is what all his states coding looks like as well. Not sure what I should do, and sorry if I'm confusing anyone.
« Last Edit: April 23, 2016, 10:51:51 PM by Playing Enemy »


        "Maybe I am what they say I am.  A maniac...a psycho killer."

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Help/Advice With Coding Questions for W.I.P.s
« Reply #28 on: April 24, 2016, 05:02:03 AM »
[State 59, VarSet]
type = VarSet
trigger1 =roundstate!=2 && var(59)=0
v = 59
value = 1

Well, that's turning the AI on. All the rest are just AI checks and things to make stuff work. The reason the above is automatic, is because it happens the second the fight starts. 1.0 code uses AIlevel to find out if AI should be on, using AIlevel > 0 or whatever is a perfectly good way to turn on an AI var because it identifies the player is not a human. You need to actually use AI activation methods if you're sticking with winmugen.

So, change the above triggers and make yourself about 30 AI only commands. Simplest method.

Offline Playing Enemy

  • Portrait & Screenpack Creator
  • Contributor
  • ****
  • Posts: 911
  • Last Login:December 26, 2018, 03:59:17 PM
  • THE HARD GOODBYE
    • Royalty7 - The best decision I ever made
    • Email
Re: Help/Advice With Coding Questions for W.I.P.s
« Reply #29 on: April 26, 2016, 04:49:10 PM »
Alright, thanks for the response on this. I apologize, but I'm still a little confused. I know exactly how to add 30 or so AI only commands, and change how var(59) activates, but is this the trigger you were referring to that I should change? This one from the var(59) activation code...

trigger1 =roundstate!=2 && var(59)=0

or these ones, from the "Null" sections...? Since we know they are in conflict with one another, makes sense.

triggerall = var(59) >6
triggerall = var(59)=1

Or is it all 3 that need to be changed?
As far as the 30 AI only commands, this is what I am going to try replacing his original var(59) activation code with. Is it okay if this is posted in his cns file like his original var(59) coding currently is located at? I only ask cause I usual see an AI activation code in the characters CMD file, not the CNS, so it's throwing me off a little.
(click to show/hide)


        "Maybe I am what they say I am.  A maniac...a psycho killer."

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Help/Advice With Coding Questions for W.I.P.s
« Reply #30 on: April 27, 2016, 02:14:40 AM »
Almost. But do it when roundstate = 2 rather than != 2. Like i say, fine for AIlevel. But those commands are all entered during the fight. So that means roundstate 2

The other method is activating at 0, prefight state 5900 and 1, intros. Yours because you are using ye olde horrible method has to happen during 2, fight.

Offline Playing Enemy

  • Portrait & Screenpack Creator
  • Contributor
  • ****
  • Posts: 911
  • Last Login:December 26, 2018, 03:59:17 PM
  • THE HARD GOODBYE
    • Royalty7 - The best decision I ever made
    • Email
Re: Help/Advice With Coding Questions for W.I.P.s
« Reply #31 on: May 15, 2016, 02:53:25 PM »
@Cyanide
Sorry for not responding for a few weeks, I was trying to complete the last thing you said to try, but wasn't able to figure it out. AI is totally new to me and kind of confusing at least as far as Frank West goes, and I couldn't make the best sense out of what you were explaining to do in you last post. I asked Kamekaze about it though, since he is the one who coded the character, and he said it would only be possible to fix what I'm trying to fix if I completely recoded the character from scratch. Sounds insane, but I don't know enough to dispute it.

Another issue I'm having with a different character though is, I've converted everything that needs converting including sff to winmugen sff, and recoding everything that needs to be changed for winmugen, but when I go to load the character, they crash winmugen, and just give an error that says, "Can't Access Data, Error in ABC.CNS, Error loading p1". I pasted KFM's constants file and had the character use that for their cns, and they will now load in winmugen, so I can safely say the problem is something to do with the constants. Does anyone have any idea what type of thing in the constants could lead to this type of error message? I'd just use KFM's since it's working, but the character uses different values, so it wouldn't be correct or accurate, even if it's allowing the character to load.
« Last Edit: May 15, 2016, 10:56:06 PM by Playing Enemy »


        "Maybe I am what they say I am.  A maniac...a psycho killer."

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Help/Advice With Coding Questions for W.I.P.s
« Reply #32 on: May 16, 2016, 03:53:35 AM »
Look at KFM's constants. Look at the originals. Compare. Where possible use the originals. Where not possible, that's a new 1.0 constant and you won't be able to do anything.

Also. Oh, Kame's AI. Yeah, you're not really changing that without a lot of work. You'd be better served trashing it and doing a basic AI of your own.

Offline Playing Enemy

  • Portrait & Screenpack Creator
  • Contributor
  • ****
  • Posts: 911
  • Last Login:December 26, 2018, 03:59:17 PM
  • THE HARD GOODBYE
    • Royalty7 - The best decision I ever made
    • Email
Re: Help/Advice With Coding Questions for W.I.P.s
« Reply #33 on: May 16, 2016, 08:07:15 AM »
Okay, I'll do that with KFM like you suggested. A friend of mine said something similarm and it made sense as well.
As for Frank West, I don't really have the confidence in myself yet to code all new AI from scratch. Would it just be possible to remove just the AI all together without effecting anything else? I'm really only trying to be able to play as him, not against him, even though it'd be nice. I'm not one of those guys that cares for watch mode either, and just like to play myself. This is what Kamekaze said to me about Frank West though before you answer.

(click to show/hide)
The part about the sff and pals/colors isn't an issue though, as I've worked through everything except for the AI takeover.


        "Maybe I am what they say I am.  A maniac...a psycho killer."

Offline Cyanide

  • MUGEN Content Architect
  • *****
  • Posts: 813
  • Last Login:March 29, 2019, 06:52:34 AM
    • Mugen Obscurity
Re: Help/Advice With Coding Questions for W.I.P.s
« Reply #34 on: May 17, 2016, 03:46:40 AM »
Sorry, i think at this point i'd need to download the character and i genuinely hate doing that.

Offline Playing Enemy

  • Portrait & Screenpack Creator
  • Contributor
  • ****
  • Posts: 911
  • Last Login:December 26, 2018, 03:59:17 PM
  • THE HARD GOODBYE
    • Royalty7 - The best decision I ever made
    • Email
Re: Help/Advice With Coding Questions for W.I.P.s
« Reply #35 on: May 17, 2016, 05:58:49 AM »
I don't blame you, and it's all good. It's too bad, at least for me, but it is what it is. I still pmed him to you though, just in case. None the less, thanks for helping me get this far with him. It's good to learn new things whether they lead to victory or not.


        "Maybe I am what they say I am.  A maniac...a psycho killer."

Tags:
 


* IMT Facebook

Help us by Donating!

IMT Discord

Join us at our Discord! Click the image below!

* IMT Shoutbox

Sorry, this shoutbox does not exist.

* Recent Posts

Spooky House(1.1 Only/AIGS) by Vegaz by LightFlare
[Today at 11:31:36 AM]


Rooftop Skyline(1.1 Only/AIGS) by Vegaz by LightFlare
[October 21, 2024, 12:13:37 PM]


Secluded Base(1.1 Only/AIGS) by Vegaz by LightFlare
[October 17, 2024, 01:21:06 PM]


Ultimate Balrog + stage by ELECTRO
[October 17, 2024, 05:40:31 AM]


Eternal Lament Stage 1.1 & 1.0 by MatreroG
[October 11, 2024, 05:03:17 PM]


Classic VS : Balrog by ELECTRO
[October 08, 2024, 04:35:53 PM]


IMT Tutorials and Documentation gone? by tehdevil
[October 06, 2024, 04:25:52 AM]


Justice League Themyscira Stage by Vegaz by LightFlare
[October 04, 2024, 08:23:57 AM]


D2TD VS Showcase Thread by D2TD
[September 30, 2024, 12:29:35 AM]


Mugen Of Solitude:Spacestation 1.0 Updated Stage By Supaman2525 & OldGamer by Aumio Khan
[September 29, 2024, 09:12:20 AM]

* IMT Calendar

October 2024
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 [31]

SimplePortal 2.3.5 © 2008-2012, SimplePortal