Feature Paths and Type69

I was working with paths in a script and realized there isn't much native KoLMafia support for them, besides the function my_path(). With new paths constantly being added and the new Type69 restrictions for current challenge path, maybe more support should be added? I was thinking they could have their own data type like $Class. Inside their record you could have a "Type69" which gives a true/false if it is currently a type69 path. Also, items could use a "Type69" record.

All this might be too niche and not worth the effort, but I figured I'd throw the idea out there. Thanks for reading!
 

lostcalpolydude

Developer
Staff member
What you really want is to know whether the person using your script is currently under type69 restrictions, right? This could be a simple ASH function, maybe is_type69() or something. Having a type69 proxy field for each path just means that people would go a month without updating mafia after the new path comes out and it would be wrong until they update.
 
Hmm, that is a good point. In that case, it would probably be better to have an is_type69() type of function and maybe a path_list() function that would return a map of current valid paths? Those two would essentially do everything I was purposing.
 
I have a script that could use the second one to either validate that the imputed path is indeed valid or create a list from all possible paths.

I can't really think of any other uses tho, and I could probably get the same effect by creating a matcher and parsing the Paths wiki page.
 

lostcalpolydude

Developer
Staff member
So this is for someone to type in a path name before starting an ascension? I feel like you would need a path name to path id mapping to automate the ascension starting, if I'm picturing this properly.
 
No, it isn't for ascension starting, although that is an interesting idea. I was thinking of using it for this script which allows you to set item pulls. When you run the main script, it would pull items based on your character info (path/class/etc). Since there are so many paths, I made it where you could type which paths you want it to show. However, if you typo it or make up a path it currently doesn't warn/throw an error.
 

Bale

Minion
So you need a way for mafia to determine if a path is valid. Like a $path[] data class. Or a path_to_int() function.

I was working with paths in a script and realized there isn't much native KoLMafia support for them, besides the function my_path(). With new paths constantly being added and the new Type69 restrictions for current challenge path, maybe more support should be added? I was thinking they could have their own data type like $Class. Inside their record you could have a "Type69" which gives a true/false if it is currently a type69 path. Also, items could use a "Type69" record.


It seems to me that you might be asking the wrong question. Besides asking if the path is under type69 restriction, what you might want to know is if each item is_unrestricted().
 
That is true, although if I don't know if the current path is under restriction, it would be hard to know if I need to test items. The is_unrestricted() solves checking items, but I still don't have a reliable way of knowing if the selected path is under Type69 restrictions. Type69 only applies to the current challenge path, right?
 

lostcalpolydude

Developer
Staff member
That is true, although if I don't know if the current path is under restriction, it would be hard to know if I need to test items. The is_unrestricted() solves checking items, but I still don't have a reliable way of knowing if the selected path is under Type69 restrictions. Type69 only applies to the current challenge path, right?

And is_unrestricted() returns true for everything if you aren't currently under type69 restrictions.
 

Bale

Minion
Then you really need a new function called is_type69ed() which will tell you if an item is out of style in the current type 69 path. Since is_unrestricted() won't tell you that if you are in aftercore.
 

lostcalpolydude

Developer
Staff member
Mafia would have to automatically update the year it uses in that URL. That isn't straightforward to implement properly here, when you consider Jick's talk of not necessarily having a winter path in the future.
 

Bale

Minion
I hadn't heard him say that. That's... disappointing. New paths, even weak ones, are part of what keeps me playing. I was starting to get disaffected from the game just about the time he invented "Bees Hate You," but that kept me playing even after I hardcore permed my last skill. Now, the excitement of wondering what new path will appear every 3 months is a big thing. I'd be extremely disappointing to hear that I'll have to wait 6 months for the new path next year. :(
 

Darzil

Developer
I think he feels a little bit frustrated with the design goal of "make something boring that people won't mind not doing because of Crimbo".
 
Top